█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

Cognita

TrueFoundry का मॉड्यूलर, API-आधारित RAG फ़्रेमवर्क, जिसमें नो-कोड UI है (मार्च 2026 में आर्काइव्ड)

RAG Frameworks & Platformsओपन सोर्स
भाषा
Python
लाइसेंस
Apache-2.0
$git clone https://github.com/truefoundry/cognita.git
संक्षेप में

Cognita क्या है?

Cognita TrueFoundry का मॉड्यूलर, API-आधारित RAG फ़्रेमवर्क, जिसमें नो-कोड UI है (मार्च 2026 में आर्काइव्ड). यह Retrieval & Knowledge (RAG) टूल्स की RAG Frameworks & Platforms श्रेणी में आता है; ओपन सोर्स है, Python में लिखा गया है और Apache-2.0 लाइसेंस के तहत है। शुरू करने के लिए: repository क्लोन करें.

सारांश

Cognita DocsQA screen with collection, query controller, model, retriever and prompt template settings beside a generated answer and its source documents
The DocsQA view: pick a collection, model and retriever, ask a question, and read the answer with the chunks it was grounded inCognita README ↗

Cognita एक ओपन सोर्स फ़्रेमवर्क है, जिसे TrueFoundry ने बनाया है। इसका मकसद retrieval-augmented generation (RAG) कोडबेस को इस तरह व्यवस्थित करना है कि वह notebook से production तक आसानी से जा सके। इसका README समस्या को सीधे बताता है: LangChain और LlamaIndex से prototype बनाना आसान है, लेकिन production में chunking और embedding कोड को job के रूप में चलना होता है, answering कोड को scalable API सर्विस होना होता है, models को API के पीछे serve करना होता है, और vector database को ठीक से deploy करना होता है। Cognita अंदर से LangChain और LlamaIndex का इस्तेमाल करता है और इनमें से हर हिस्से को मॉड्यूलर, API-आधारित कंपोनेंट के रूप में लपेटता है।

Cognita architecture diagram: an indexing job loads, parses and embeds data sources into a vector DB and metadata store, and a backend API service's query controller retrieves and generates answers through an LLM gateway
Cognita's architecture: the indexing job on top, the query-controller API service belowCognita README ↗

एक deployment इन हिस्सों में बंटा होता है: data sources (लोकल डिस्क, वेब URLs, S3-जैसा storage, TrueFoundry artifacts), एक Postgres-आधारित metadata store जो हर collection के data sources, parser settings और embedding model को रिकॉर्ड करता है, एक model gateway जो एक ही models_config.yaml से कॉन्फ़िगर होता है, एक vector database (डिफ़ॉल्ट रूप से Qdrant जुड़ा हुआ है), एक indexing job, और एक FastAPI API server। indexing job data sources को स्कैन करता है, उन्हें vector database में पहले से मौजूद चीज़ों से मिलाता है और केवल नई या बदली हुई फ़ाइलों को डाउनलोड, parse, chunk और embed करता है, इसलिए incremental indexing डिफ़ॉल्ट है। query की तरफ़, हर application एक query controller class है जिसके decorated methods FastAPI routes बन जाते हैं।

इसमें एक वेब फ़्रंटएंड आता है, जहाँ नॉन-डेवलपर data sources और collections बना सकते हैं, indexing शुरू कर सकते हैं और सवाल पूछ सकते हैं, साथ ही model, retriever, retriever configuration और prompt template चुन सकते हैं। Cognita पूरी तरह लोकल रूप से Docker Compose के ज़रिए चल सकता है, जिसमें लोकल LLMs, embeddings और reranking के लिए Ollama और Infinity server वैकल्पिक profiles के रूप में जुड़ते हैं, या इसे TrueFoundry के application catalogue के ज़रिए deploy किया जा सकता है। प्रोजेक्ट अब सक्रिय रूप से maintain नहीं किया जाता: मार्च 2026 में README में इस आशय का नोट जोड़ा गया था और GitHub repository को केवल-पढ़ने-योग्य (read-only) आर्काइव कर दिया गया है, इसलिए इसे एक reference architecture मानें जिसे आप fork करें, न कि ऐसी dependency जिसे अपडेट मिलते रहेंगे।

यह क्या करता है

  • मॉड्यूलर, registry-आधारित कंपोनेंट: BaseDataLoader, BaseParser या BaseVectorDB को subclass करके और रजिस्टर करके अपना खुद का data loader, parser या vector-DB adapter लिखें
  • Incremental indexing job जो data sources की तुलना vector database से करता है और केवल नई या अपडेट की गई फ़ाइलों को प्रोसेस करता है, मैन्युअली या cron schedule पर चलता है
  • Query controllers: एक decorated Python class जिसके methods FastAPI endpoints बन जाते हैं, साथ में similarity search, query decomposition और document reranking जैसे retrievers
  • LLM, embedding और reranking providers के लिए एक ही models_config.yaml model gateway, जिसमें OpenAI, Ollama और Infinity server शामिल हैं
  • Unstructured के ज़रिए documents के parsers, multimodal (vision), वेब पेज, audio (faster-whisper server के ज़रिए) और video
  • Data sources और collections मैनेज करने और configurable model, retriever और prompt के साथ Q&A चलाने के लिए एक no-code UI

शुरू करें

README सलाह देता है कि पूरा stack Docker Compose (version 25+) से लोकल रूप से चलाया जाए। यह metadata के लिए Postgres, एक Qdrant server, FastAPI backend और frontend शुरू करता है।

Repository क्लोन करें

bashbash
git clone https://github.com/truefoundry/cognita.git
cd cognita

Model providers कॉन्फ़िगर करें

Sample model config को कॉपी करें। डिफ़ॉल्ट रूप से यह लोकल providers को सक्षम करता है जिनके लिए Ollama और Infinity server चाहिए; इसके बजाय OpenAI इस्तेमाल करने के लिए models_config.yaml में openai provider की कमेंट हटाएँ और compose.env में OPENAI_API_KEY सेट करें।

bashbash
cp models_config.sample.yaml models_config.yaml

सेवाएँ शुरू करें

इससे cognita-db (Postgres), qdrant-server, cognita-backend और cognita-frontend चालू हो जाते हैं। Qdrant http://localhost:6333 पर सुनता है, backend http://localhost:8000 पर और UI http://localhost:5001 पर।

bashbash
docker-compose --env-file compose.env up

लोकल models जोड़ें (वैकल्पिक)

LLMs, embeddings और reranking को लोकल रूप से सर्व करने के लिए ollama और infinity profiles सक्षम करें; फिर Infinity server http://localhost:7997 पर उपलब्ध होता है। बदलाव pull करने या packages जोड़ने के बाद --build जोड़ें।

bashbash
docker-compose --env-file compose.env --profile ollama --profile infinity up

UI में documents index करें और सवाल पूछें

Frontend में एक data source बनाएँ (लोकल directory, वेब URL, GitHub URL या TrueFoundry artifact), फिर embedding model चुनकर और data source जोड़कर एक collection बनाएँ; Process पर क्लिक करते ही indexing शुरू हो जाती है। DocsQA tab में collection, LLM, retriever और prompt चुनें और अपना सवाल पूछें।

अपना खुद का query controller लिखें

backend/modules/query_controllers/ के अंतर्गत एक class जोड़ें, उसे decorate करें, और उस package की __init__.py में import करें। हर decorated method एक FastAPI route के रूप में expose होता है — यहाँ POST /my-controller/answer।

pythonpython
from backend.server.decorator import query_controller, post

@query_controller("/my-controller")
class MyCustomController():
    @post("/answer")
    def answer(query: str):
        # your retrieval + generation logic
        ...

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

Cognita's Create a new document collection panel with collection name, embedding model, data source and JSON parser configuration fields
Creating a collection in the UI
Cognita collections tab listing a collection's linked data source with a COMPLETED indexing status
Indexing status for a collection's data source
  • इसे एक reference layout के रूप में इस्तेमाल करें, जब notebook वाले RAG prototype को अलग indexing-job और query-service components में बदलना हो
  • इसे तब चुनें जब गैर-तकनीकी सहकर्मियों को documents अपलोड करने, collections बनाने और अलग-अलग retrievers व prompts आज़माने के लिए UI चाहिए
  • इसे तब चुनें जब आप एक self-hosted document Q&A stack चाहते हों, जिसे Docker Compose, Ollama और Infinity के साथ एक ही मशीन पर शुरू से अंत तक चलाया जा सके
  • इसे fork-और-अपना-बनाओ वाले starting point के रूप में इस्तेमाल करें — repository आर्काइव है, इसलिए अपनी copy की देखभाल खुद करने की योजना बनाएँ

How Cognita compares

Cognita alongside other open-source rag frameworks & platforms tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
Dify★ 162kLLM और RAG ऐप विज़ुअल कैनवास पर बनाने के लिए ओपन सोर्स प्लेटफ़ॉर्म
graphify★ 156kकोड, डॉक्स, PDF और इमेज वाले फ़ोल्डर को एक ऐसे नॉलेज ग्राफ़ में बदलें जिसमें query की जा सके
RAGFlow★ 95.1kगहरी डॉक्यूमेंट समझ और स्रोत से जुड़े, ट्रेस किए जा सकने वाले उद्धरणों वाला ओपन सोर्स RAG engine
Context7★ 65.8kनवीनतम, वर्ज़न-विशिष्ट लाइब्रेरी डॉक्स सीधे आपके कोडिंग एजेंट के प्रॉम्प्ट में
Pathway★ 61.9kडेटा बदलने के साथ-साथ अपडेट रहने वाली Python ETL और RAG पाइपलाइन
LightRAG★ 41kग्राफ़-आधारित RAG, जो आपके दस्तावेज़ों को क्वेरी योग्य नॉलेज ग्राफ़ में बदल देता है
PageIndex★ 40.9kVectorless, reasoning-based RAG जो लंबे डॉक्युमेंट से tree index बनाता है
Cognita★ 4.4kTrueFoundry का मॉड्यूलर, API-आधारित RAG फ़्रेमवर्क, जिसमें नो-कोड UI है (मार्च 2026 में आर्काइव्ड)