Loading repository data…
Loading repository data…
kitessafikadu / repository
Safik AI is web app with a Retrieval-Augmented Generation (RAG) system that powers an AI chatbot using ChromaDB vector store, LangChain, and HuggingFace embeddings. This system allows users to ask questions about company services, pricing, and information stored in a knowledge base.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Safik AI is Web App with a retrieval augmented generation (RAG) system that powers an AI chatbot using ChromaDB vector store, LangChain, and HuggingFace embeddings. This system allows users to ask questions about company services, pricing, and information stored in a knowledge base.
RAG-System/
├── backend/
│ ├── main.py # FastAPI server and endpoints
│ ├── rag_system.py # RAG system implementation
│ ├── ingest_data.py # Data ingestion script
│ └── requirements.txt # Python dependencies
├── frontend/
│ ├── app/ # Next.js App Router pages
│ ├── components/ # React components
│ ├── public/ # Static assets
│ ├── next.config.mjs # Next.js configuration
│ └── package.json # Frontend dependencies
├── data/
│ └── content/ # Knowledge base JSON files
│ ├── about.json
│ ├── services.json
│ ├── pricing.json
│ ├── faq.json
│ ├── case_studies.json
│ └── homepage.json
├── chroma_db/ # ChromaDB vector store (generated)
└── README.md
git clone https://github.com/kitessafikadu/safik-ai.git
cd safik-ai
cd backend
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
pip install -r requirements.txt
Note: This will install PyTorch and transformers which may take some minutes
cd backend
python main.py
The server will start on http://localhost:8000
You can also use uvicorn directly:
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
Navigate to the frontend directory:
cd frontend
Install dependencies (first time only):
npm install
Start the development server:
npm run dev
Open http://localhost:3000 in your browser.
GET /
Returns server status.
POST /api/chat
Content-Type: application/json
{
"question": "What AI services do you offer?"
}
Response:
{
"answer": "We offer six main AI services...",
"sources": ["Services - RAG Systems", "Services - Conversational AI"]
}
Create a .env file in the backend/ directory:
PERSIST_DIRECTORY=./chroma_db
COLLECTION_NAME=website_content
./chroma_db (relative to backend)website_contentsentence-transformers/all-MiniLM-L6-v2google/flan-t5-baseThe knowledge base files in data/content/ should be JSON files with the following structures:
{
"page": "Services",
"sections": [
{
"title": "Section Title",
"content": "Section content..."
}
]
}
{
"page": "FAQ",
"questions": [
{
"question": "Question text?",
"answer": "Answer text..."
}
]
}
{
"page": "Case Studies",
"studies": [
{
"client": "Client Name",
"challenge": "Challenge description",
"solution": "Solution description",
"results": "Results description"
}
]
}
Test the RAG system directly:
cd backend
python rag_system.py
This will run a series of test questions and display results.
data/content/python ingest_data.py
Note: This will clear existing data and rebuild the vector store.Edit backend/rag_system.py to:
frontend/app/globals.css for stylingfrontend/components/frontend/app/Key Python packages:
fastapi==0.115.0 - Web frameworkuvicorn[standard]==0.32.0 - ASGI serverlangchain==0.3.7 - LLM frameworklangchain-huggingface - HuggingFace integrationchromadb==0.4.22 - Vector databasetransformers==4.40.0 - HuggingFace transformerssentence-transformers==2.7.0 - Sentence embeddingstorch==2.9.1 - PyTorch (for transformers)pip install -r requirements.txtchroma_db/ folder and re-ingest datamain.py or use: uvicorn main:app --port 8001Built with ❤️ using FastAPI, LangChain, and ChromaDB