Skip to content

Nish-Hub/ContextRAG

Repository files navigation

ContextRAG

Give LLMs the Context They Need

ContextRAG is a context extension platform for AI systems that enables Large Language Models (LLMs) to understand real project environments by retrieving relevant knowledge before generating responses.

Instead of sending raw prompts directly to an LLM, ContextRAG retrieves project context — such as documentation, architecture notes, code snippets, and developer conversations — and augments the prompt before sending it to the model.

This enables context-aware AI responses grounded in real project knowledge.


The Problem

Modern AI assistants are powerful, but they lack awareness of the developer’s actual project environment.

Large Language Models typically do not know:

  • your project architecture
  • your codebase
  • internal documentation
  • design decisions
  • developer discussions

As a result:

  • developers must manually paste context into prompts
  • important architectural knowledge is lost between conversations
  • AI responses lack grounding in real systems

The Solution

ContextRAG introduces a context retrieval layer between the user and the LLM.

Developer ↓ ContextRAG ↓ LLM ↓ Context-Aware Response

Before sending a prompt to the LLM, ContextRAG:

  1. Converts the query into embeddings
  2. Retrieves relevant context from a vector database
  3. Combines retrieved knowledge with the query
  4. Sends an augmented prompt to the LLM

This produces responses grounded in real project context.


Core Architecture

ContextRAG is built around a Retrieval Augmented Generation (RAG) architecture.

Before sending a prompt to the LLM, ContextRAG:

  1. Converts the query into embeddings
  2. Retrieves relevant context from a vector database
  3. Combines retrieved knowledge with the query
  4. Sends an augmented prompt to the LLM

This produces responses grounded in real project context.


Core Architecture

ContextRAG is built around a Retrieval Augmented Generation (RAG) architecture.

User Query ↓ RAG Service ↓ Embedding Model ↓ Vector Database ↓ Context Retrieval ↓ Prompt Construction ↓ LLM ↓ Response

The system continuously learns from project knowledge and developer interactions.


Key Features

Multi-LLM Support

Use multiple model providers including OpenAI, Claude, Gemini, or local models.

Vector Knowledge Retrieval

Project documentation, code, and architecture notes become searchable context.

Conversation Memory

Developer discussions are summarized and stored as reusable knowledge.

Event-Driven Knowledge Ingestion

Kafka pipelines allow scalable ingestion of documentation, repositories, and logs.


Project Structure

ContextRAG │ ├── common │ ├── rag-service │ ├── docs │ ├── architecture │ └── website

Initial modules:

  • common – shared models and utilities
  • rag-service – core RAG orchestration service

Development Status

ContextRAG is currently under active development.

Initial milestones:

  • architecture definition
  • RAG prototype
  • knowledge ingestion pipeline
  • conversation memory
  • developer platform

Vision

The long-term vision of ContextRAG is to build the contextual intelligence layer for AI systems.

Future capabilities may include:

  • full codebase awareness
  • architecture reasoning
  • observability data ingestion
  • AI-assisted system design
  • developer workflow intelligence

Documentation

Additional project documentation:

  • Whitepaper
  • Architecture Document
  • System Design Playbook

These documents explain the architecture and long-term design of the platform.


License

Licensed under the Apache License 2.0.

See the LICENSE file for details.


Website

https://contextrag.dev


Author

Nishant

About

ContextRAG — Give LLMs the Context They Need. A context extension platform that enables AI systems to understand project environments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages