| title | CorpGuide AI |
|---|---|
| emoji | 🤖 |
| colorFrom | blue |
| colorTo | indigo |
| sdk | docker |
| pinned | false |
| app_port | 7860 |
CorpGuideAI is an advanced AI-powered assistant designed to help employees navigate and understand internal HR policies. Leveraging Retrieval-Augmented Generation (RAG), it provides accurate, context-aware answers based on your organization's PDF documents.
- RAG Architecture: Combines vector search with generative AI for precise answers.
- LLM Integration: Powered by Groq (using Llama models) for fast and efficient inference.
- Vector Database: Uses ChromaDB for efficient document storage and retrieval.
- Smart Ingestion:
- Extracts text from PDFs.
- Improves retrieval speed and accuracy with semantic chunking.
- Uses
Alibaba-NLP/gte-multilingual-basefor robust multilingual support.
- Chat History Management: Maintains context across the conversation session (Reset supported).
- FastAPI Backend: A high-performance API to serve requests.
- Docker Support: Containerized for easy deployment.
- Language: Python 3.10+
- Backend: FastAPI, Uvicorn
- AI/ML: LangChain, HuggingFace, ChromaDB, Groq
- Tools:
pypdf,sentence-transformers, Docker
CorpGuideAI-HR-Policy-Assistant/
├── api/
│ ├── main.py # FastAPI application & entry point
│ ├── schemas.py # Pydantic models
├── config/
│ ├── settings.py # Configuration settings
├── core/
│ ├── rag_pipeline.py # Core RAG logic & Chat History
│ ├── prompts.py # Prompt templates
├── data/ # PDF documents storage
├── services/
│ ├── document_processor.py
│ ├── vector_store.py
│ ├── llm_client.py
├── ingest.py # Document ingestion script
├── Dockerfile # Docker container configuration
├── requirements.txt # Dependencies
└── README.md # Documentation- Python 3.10+
- Groq API Key: Get it from Groq Console.
-
Clone & Setup:
git clone <repository-url> cd CorpGuideAI-HR-Policy-Assistant python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate pip install -r requirements.txt
-
Environment Variables: Create a
.envfile:GROQ_API_KEY=your_groq_api_key_here
Place your HR policy PDF files in the data/ directory.
Note: The system automatically ingests documents from the
data/directory every time the server starts. This ensures your database is always fresh and in sync with your files.
Launch the FastAPI server:
uvicorn api.main:app --reloadThe API will be accessible at: `http://localhost:8000`
-
Build Image:
docker build -t corpguide-ai . -
Run Container:
docker run -p 7860:7860 --env-file .env corpguide-ai
The API will be accessible at:
http://localhost:7860
GET /: Health check / Root.POST /chat: Chat endpoint.- Body:
{ "question": "..." }(History managed internally)
- Body:
MIT License - see LICENSE file.