An intelligent AI research assistant powered by LLMs, RAG, and LangGraph for document understanding, reasoning, and context-aware answers.
ContextFlow AI is a production-inspired AI research assistant that combines:
- Large Language Models (LLMs)
- Retrieval-Augmented Generation (RAG)
- Vector Databases
- LangGraph workflows
- Tool-assisted reasoning (AI Agent)
- Conversation/session memory
The system allows users to upload documents, retrieve relevant information, and generate grounded answers instead of relying only on an LLM's internal knowledge.
Traditional LLM chatbots have limitations:
- No access to private documents
- Hallucinated information
- No semantic document search
- Limited reasoning capabilities
- No persistent conversation context
ContextFlow AI addresses these challenges by integrating several modern AI techniques into a unified system.
The application:
- Understands user intent using an LLM
- Retrieves relevant information from uploaded documents using RAG
- Stores semantic document embeddings in a vector database
- Maintains conversational memory for contextual interactions
- Uses AI Agents to plan and execute multi-step tasks (calculation, web search)
- Produces grounded, explainable, and context-aware responses
The assistant uses a conditional LangGraph workflow:
- User sends a question.
- Router LLM determines whether Retrieval-Augmented Generation (RAG) is required.
- If RAG is required:
- Retrieve relevant documents from ChromaDB.
- Store the retrieved context in the graph state.
- The chatbot LLM generates a response.
- If the LLM requests a tool:
- Execute the appropriate tool.
- Return the tool result to the chatbot.
- Generate the final response.
- Return the answer to the user.
git clone https://github.com/<your-username>/ContextFlow-AI.gitcd ContextFlow-AIuv venvActivate it.
Windows
.venv\Scripts\activateLinux / macOS
source .venv/bin/activateuv syncCreate a .env file in the project root.
OPENAI_API_KEY=your_api_key_here
TAVILY_API_KEY=your_api_key_hereuv run uvicorn app.main:app --reloadstreamlit run .\frontend\app.pyOpen:
http://localhost:8501/
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
See the LICENSE file for more information.
