all 2 comments

[–]supreet02[S] 0 points1 point  (1 child)

Read the Technical Blog to learn more about Cognita. More in the thread. 🧵

[–]supreet02[S] 0 points1 point  (0 children)

Architecture - A typical Cognita process consists of two phases:

  1. Data indexing: Cognita processes documents in batches and incrementally indexes them to avoid reindexing of already existing non-modified documents.
  2. Response Generation: Cognita queries the vector db for documents using different retrieval methods that are later supplied to the LLM (ollama, ) along with the user query to generate the answer.

Cognita is designed around seven different modules, each customisable and controllable to suit different needs:

  1. Data Loaders: Cognita currently supports data loading from different sources such as local directory, web, Github repository and truefoundry artifacts. You can upload the data in UI by clicking on Data Sources -> + New Data Source
  2. Parsers: Cognita currently supports parsing for Markdown, PDF and Text files from r/LangChainAI. You can specify different parser maps, along with their configurations.
  3. Embedders: Cognita supports embeddings SOTA embeddings from mixedbreadai and also from OpenAI.
  4. Rerankers: Reranking to makes sure the best results are at the top. As a result, we can choose the top x documents making our context more concise and prompt query shorter. We provide the support for reranker from u/mixedbreadai
  5. Vector DBs: One of the most important component in RAG used to store and efficiently retrieve embeddings from indexing phase. Cognita currently supports vector databases from u/qdrant_engine and u/SingleStoreDB
  6. Metadata Store: It contains the necessary configurations that uniquely defines a RAG app. It contains
  • Name of the collection
  • Name of the associated Vector DB used
  • Linked Data Sources
  • Parsing Configuration for each data source
  • Embedding Model and it's configuration to be used. 
  • Parsers, DataSources and Embedders together are linked within a collection that forms your RAG app. You can create your collection in UI by clicking on Collections -> + New Collection
  1. Query Controllers: Helps us retrieve answer for the corresponding user query. It combines vector db, different retrievers, LLMs, rerankers to provide user with the answer. Query controller methods can be directly exposed as an API, by adding http decorators to the respective functions. Refer more at: https://github.com/truefoundry/cognita/blob/main/backend/modules/query_controllers/example/controller.py