Skip to content

debugnlift07/talentrag-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TalentRAG AI (Mini)

A lightweight Retrieval-Augmented Generation (RAG) system built using Python, FastAPI (planned), FAISS, and Azure OpenAI. The system enables intelligent querying over structured SQL data by converting it into semantic embeddings and retrieving relevant context before generating accurate AI responses.

Architecture Overview

User Query
     ↓
Embedding (Azure OpenAI)
     ↓
FAISS Vector Search (Similarity)
     ↓
Top-K Relevant Documents (Context)
     ↓
LLM (Azure OpenAI Chat Model)
     ↓
Final AI Answer

Components

  • Data Loader: Reads structured SQL data and converts it into natural language documents.
  • Embedding Layer: Uses Azure OpenAI to convert text into vector embeddings.
  • Vector Store (FAISS): Stores embeddings and performs similarity search.
  • Retriever: Finds top relevant documents based on semantic similarity.
  • LLM Layer: Generates final answers using retrieved context.

How to Run

1. Clone Repository

git clone <repo-url>
cd talentrag-ai

2. Create Virtual Environment

python -m venv .venv
.venv\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

4. Run Application

python -m app.main

5. Sample Query

Find Azure developer in Delhi

Required Environment Variables

Create a .env file:

AZURE_OPENAI_KEY=your_key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_EMBEDDING_MODEL=embedding-model
AZURE_OPENAI_CHAT_MODEL=chat-model

RAG Flow

SQL Data
   ↓
Convert to Text Documents
   ↓
Generate Embeddings (Azure OpenAI)
   ↓
Store in FAISS Vector DB
   ↓
User Query → Embedding
   ↓
Similarity Search (Top-K Results)
   ↓
Context Injection into LLM
   ↓
Final Answer Generation

Similarity Search Strategy

Query Embedding
   ↓
Compare with Stored Embeddings
   ↓
FAISS (L2 Distance)
   ↓
Top-K Closest Matches Returned
  • Semantic search (not keyword-based)
  • Understands meaning (e.g., "Azure Dev" ≈ "Cloud Engineer")
  • Uses vector similarity (distance-based matching)

Hallucination Reduction

  • LLM is restricted to retrieved context only.
  • No direct answering without data grounding.
  • Improves accuracy and enterprise reliability.

Example Interaction

Q: Find Azure developer in Delhi

Context Retrieved:
- Rahul (.NET Developer, Azure, Delhi)
- Neha (Cloud Engineer, AWS)

AI Answer:
Rahul is the best match as he has Azure experience and is based in Delhi.

Execution Screenshot

RAG Output

Technologies Used

  • Python
  • FAISS (Vector Database)
  • Azure OpenAI
  • SQLite (Dummy Data)
  • NumPy
  • FastAPI (Next Phase)

Future Enhancements

  • Replace FAISS with Azure AI Search
  • Add FastAPI endpoints (/ask)
  • Dockerize application
  • Deploy on Azure Container Apps
  • Add caching (Redis)
  • Frontend UI (React / Streamlit)

About

TalentRAG AI is a lightweight Retrieval-Augmented Generation (RAG) system designed to enable intelligent querying over structured enterprise data. The solution transforms traditional SQL-based datasets into semantically searchable knowledge using vector embeddings and AI-driven reasoning.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors