Skip to content
gourab9817Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Knowledge-Based Search Engine

A sophisticated Retrieval-Augmented Generation (RAG) system that combines vector-based semantic search with multiple large language models to provide intelligent document-based question answering.

View

Apps functionality

Complete functionalities

  • Multi-LLM Support: Integrates with OpenAI GPT, Anthropic Claude, and Google Gemini
  • Vector Search: Advanced semantic search using ChromaDB and sentence transformers
  • Document Processing: Support for PDF, DOCX, TXT, MD, JSON, and image files with OCR
  • Real-time Analytics: Comprehensive usage analytics and performance metrics
  • Knowledge Graph: Visual representation of document relationships and entities
  • Document Art Generation: AI-powered visual representations of document content
  • WebSocket Support: Real-time collaboration and live updates
  • Professional Web Interface: Clean, responsive frontend for document upload and querying

Architecture

├── backend/
│   ├── app/
│   │   ├── main.py          # FastAPI application
│   │   └── config.py        # Configuration management
│   ├── models/
│   │   └── schemas.py       # Pydantic models
│   └── services/
│       ├── rag_service.py           # RAG orchestration
│       ├── vector_store.py          # ChromaDB integration
│       ├── document_processor.py    # Document parsing
│       ├── knowledge_graph.py       # Graph generation
│       └── document_art_generator.py # Visual art creation
├── frontend/
│   └── templates/
│       └── index_clean.html # Web interface
└── documents/              # Sample documents

Installation

  1. Clone the repository
git clone https://github.com/Tanmay081104/Knowledge-based-search-engine.git
cd Knowledge-based-search-engine
  1. Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Configure environment variables
cp .env.example .env
# Edit .env with your API keys
  1. Download SpaCy model
python -m spacy download en_core_web_sm

Configuration

Edit the .env file with your API keys:

# Choose your preferred LLM provider
GOOGLE_API_KEY=your_google_gemini_api_key_here
## Usage

1. **Start the server**
```bash
python -m uvicorn backend.app.main:app --host 127.0.0.1 --port 8000 --reload
  1. Access the web interface Open your browser and navigate to http://127.0.0.1:8000

  2. Upload documents Use the web interface to upload PDF, DOCX, TXT, or other supported document formats.

  3. Ask questions Enter questions about your uploaded documents and receive AI-powered answers with source citations.

Key Endpoints

  • POST /upload - Upload and process documents
  • POST /query - Submit questions and receive AI-generated answers
  • GET /knowledge-graph - Generate knowledge graph visualization
  • POST /generate-doc-art/{id} - Create visual art from documents
  • GET /analytics - Retrieve system analytics and metrics

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages