# Cognita

> Open-source RAG framework by TrueFoundry for organizing modular, API-driven retrieval augmented generation applications with a UI.

Cognita is an open-source RAG (Retrieval Augmented Generation) framework from TrueFoundry that organizes RAG code into modular, API-driven components, with a frontend for trying different RAG configurations. The repository is archived, and the README notes the project is no longer actively maintained.

## What It Is

Cognita uses Langchain and LlamaIndex under the hood and structures a RAG codebase so that data loaders, parsers, embedders, retrievers and vector databases can be swapped or extended. It can run locally or be deployed in a production setup, and it can host multiple RAG systems in one app. Non-technical users can upload documents and ask questions through the UI using modules built by developers.

## How the Pipeline Works

Data sources (local directories, web URLs, GitHub URLs, S3 buckets, databases or TrueFoundry artifacts) are grouped into collections stored in a metadata store. An indexing job scans sources, compares them with the vector database state, and parses, chunks and embeds only new or changed files, which supports incremental indexing. The job can be started manually or on a cron schedule.

At query time, an API server routes a request to a query controller. The controller builds retrievers or multi-step agents, embeds the question through a model gateway, fetches chunks from the vector database and generates an answer with an LLM, returning the answer along with relevant document chunks.

## Customization and Setup

Custom data loaders, parsers, vector databases and query controllers are added by subclassing base classes and registering them. Retrieval options include similarity search, query decomposition and document reranking. Qdrant and SingleStore are the supported vector databases, and models can be served through OpenAI, Ollama or Infinity servers. Local setup uses Docker Compose, which starts Postgres, Qdrant, the FastAPI backend and the frontend. Deployment on TrueFoundry is also documented. Recent README updates list audio and video parsers and a model gateway config file.

## Features
- Modular, API-driven RAG components
- Incremental indexing
- Similarity search, query decomposition and reranking retrievers
- No-code UI for data sources, collections and QnA
- Docker Compose local deployment
- Model gateway configuration file
- Audio and video parsers
- Multimodal vision parser
- Custom loaders, parsers, vector DBs and query controllers
- Qdrant and SingleStore vector DB support

## Integrations
Langchain, LlamaIndex, Qdrant, SingleStore, Ollama, Infinity Server, OpenAI, Postgres, Prisma, TrueFoundry, mixedbread-ai, FastAPI

## Platforms
WEB, API, LINUX, MACOS, WINDOWS

## Pricing
Open Source

## Links
- Website: https://cognita.truefoundry.com
- Repository: https://github.com/truefoundry/cognita
- EveryDev.ai: https://www.everydev.ai/tools/cognita
