Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Debugging Assistant

Overview

AI Debugging Assistant is a Retrieval-Augmented Generation (RAG) system that helps developers diagnose and resolve programming errors using real-world debugging knowledge collected from Stack Overflow.

The system retrieves relevant debugging discussions using semantic search, reranks the results using a Cross-Encoder model, and generates structured solutions using Gemini 2.5 Flash.


Features

  • Semantic error retrieval using BGE embeddings
  • ChromaDB vector database
  • Metadata-based filtering by error type
  • Cross-Encoder reranking for improved retrieval quality
  • Gemini-powered root cause analysis and fixes
  • FastAPI backend with REST API endpoints
  • Swagger UI for API testing

Architecture

User Query ↓ FastAPI API ↓ Metadata Filtering ↓ BGE Embeddings ↓ ChromaDB Retrieval ↓ Cross Encoder Reranking ↓ Gemini 2.5 Flash ↓ Root Cause Analysis ↓ Solution + Code Fix + Prevention Tips

Tech Stack

Backend

  • Python
  • FastAPI
  • Uvicorn

Retrieval

  • ChromaDB
  • Sentence Transformers
  • BAAI/bge-small-en-v1.5
  • Cross-Encoder (ms-marco-MiniLM-L-6-v2)

LLM

  • Gemini 2.5 Flash

Data Source

  • Stack Overflow API

Project Structure

AI Debugging Assistant/

backend/

  • main.py
  • rag_service.py

rag/

  • generator.py
  • reranker.py
  • rag_pipeline.py

api/ preprocessing/ embeddings/ vector_db/ data/ chroma_db/

requirements.txt README.md


API Endpoints

Home

GET /

Response:

{ "message": "AI Debugging Assistant API Running" }

Debug Error

POST /debug

Request:

{ "error": "ModuleNotFoundError: No module named pandas" }

Response:

{ "query": "...", "sources": 5, "answer": "ROOT CAUSE ..." }


Installation

Clone the repository:

git clone

Install dependencies:

pip install -r requirements.txt

Create a .env file:

GEMINI_API_KEY=your_api_key

Run FastAPI:

python -m uvicorn backend.main:app --reload

Open:

http://127.0.0.1:8000/docs


Example Queries

  • ModuleNotFoundError: No module named pandas
  • ModuleNotFoundError: No module named streamlit
  • AttributeError: 'list' object has no attribute 'shape'
  • RuntimeError: CUDA out of memory
  • KeyError: 'user_id'

Future Enhancements

  • Hybrid Search (BM25 + Vector Search)
  • React Frontend
  • LangGraph-based Agentic AI
  • Multi-source Retrieval (GitHub Issues + Documentation)
  • Retrieval Evaluation Framework

Author

Prasoon

About

AI-powered debugging assistant using RAG, ChromaDB, Cross-Encoder Reranking, FastAPI, React, and Gemini.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages