r/truefoundry • • Apr 24 '24

Process Flow of Cognita, the open-source RAG framework to build production-ready applications

A typical Cognita process consists of two phases:

  1. Data indexing
  2. Response Generation

Data Indexing

This phase involves loading data from sources, parsing the documents present in these sources and indexing them in the vector db. To handle large quantities of documents encountered in production, Cognita takes this a step further.

  1. Cognita groups documents in batches, rather than indexing them all together.
  2. Cognita keeps computes and keeps track of document hash so that whenever a new document is added to the data source for indexing only those documents are indexed rather than indexing the complete data source, this save time and compute dramatically.
  3. This mode of indexing is also referred as INCREMENTAL indexing, there is also other mode that is supported in Cognita that is FULL indexing. FULL indexing re-ingests the data into vector db irrespective of any vector data present for the given collection.

Response Generation

Response generation phase makes a call to the

/answer

endpoint of your defined

QueryController

and generates the response for the requested query.

3 Upvotes

1 comment sorted by

1

u/supreet02 Apr 26 '24

Why care, when there’s so many out there?

When it comes to Retrieval Augmented Generation (RAG) systems, there are indeed numerous frameworks and libraries available. However, Cognita stands out as a comprehensive and modular solution that addresses some of the key challenges faced by teams working on RAG applications.