AI-Powered Retrieval-Augmented Generation (RAG) Knowledge Assistant
Document Chunking β’ TF-IDF Retrieval β’ Cosine Similarity Search β’ Groq LLaMA 3.3
Cognitive RAG Assistant is a modern Retrieval-Augmented Generation (RAG) system that allows users to upload or paste documents, automatically index and chunk content, retrieve the most relevant information using TF-IDF and cosine similarity, and generate contextual answers powered by Groq's LLaMA 3.3 model.
Unlike traditional chatbots that rely solely on pre-trained knowledge, this system grounds every response in the provided document, ensuring accurate and context-aware answers.
- Smart document chunking
- Automatic text segmentation
- Context preservation through chunk overlap
- Real-time indexing pipeline
- TF-IDF based ranking
- Cosine similarity scoring
- Top-K chunk retrieval
- Highlighted source chunks
- Groq LLaMA 3.3 integration
- Context-aware answer generation
- Hallucination reduction
- Source-grounded responses
- Retrieval pipeline monitoring
- Chunk activation indicators
- Similarity score tracking
- Document statistics dashboard
- Generate professional PDF reports
- Export answers instantly
- Query history preservation
- Fully responsive interface
- Smooth animations with Motion
- Clean professional dashboard
- Interactive retrieval workflow
Document Input
β
βΌ
Document Chunking
β
βΌ
TF-IDF Vectorization
β
βΌ
Cosine Similarity Search
β
βΌ
Top Relevant Chunks
β
βΌ
Groq LLaMA 3.3
β
βΌ
Generated Answer
- React
- TypeScript
- Vite
- Tailwind CSS
- Motion
- Lucide Icons
- TF-IDF
- Cosine Similarity
- Custom Chunking Engine
- Groq API
- LLaMA 3.3 70B Versatile
- jsPDF
- dotenv
git clone https://github.com/yourusername/cognitive-rag-assistant.git
cd cognitive-rag-assistantnpm installCreate a .env file:
GROQ_API_KEY=your_groq_api_key_herenpm start- What is Agentic AI?
- What companies launched AI agents?
- What is the IndiaAI Mission?
- What is the EU AI Act?
- What companies form the Magnificent Seven?
- Why did NVIDIA cross $3 trillion market cap?
- What caused Bitcoin's surge?
- How are wearables used in healthcare?
- What is the Ayushman Bharat Digital Mission?
- How is AI accelerating drug discovery?
This project demonstrates:
- Retrieval-Augmented Generation (RAG)
- Information Retrieval
- Natural Language Processing
- Context Engineering
- Large Language Model Integration
- Vector Search Fundamentals
- Full-Stack AI Application Development
Contributions, feature suggestions, and improvements are welcome.
If you'd like to improve the retrieval engine, UI/UX, model integration, or documentation, feel free to open an issue or submit a pull request.
If you found this project useful, consider giving it a star β and sharing it with others interested in AI, NLP, and Retrieval-Augmented Generation systems.
Supreet Mohapatra
Building intelligent systems, AI-powered applications, and real-world machine learning projects.


