The RAG (Retrieval-Augmented Generation) system is a core component of the HereFamni project. It integrates retrieval and generation capabilities to address the detection of healthcare-related fake news. By leveraging a database of vector embeddings, the RAG model retrieves relevant content and generates responses augmented by this information.
- Retrieves context-relevant information from a knowledge base.
- Generates responses enriched with retrieved information.
- Exposes API endpoints for integration with external systems.
- Docker and Docker Compose installed.
- A running PostgreSQL database container (configured separately).
- Clone the repository:
git clone https://github.com/HeReFanMi/Rag.git cd Rag - Build and Run the Docker Container:
Build the Docker image and start the containers:
docker build -t ragystem-flask-app . docker-compose up - Access the Application:
Once the containers are running, access the API at:
http://localhost:5000
Description: Retrieve similar content chunks from the knowledge base. Request Body:
{
"query": "Your query string here"
}Response:
{
"results": [
{"chunk_id": 1, "content": "Sample content", "score": 0.9},
...
]
}The following environment variables are used to configure the system:
DB_HOST: Hostname or IP address of the database.DB_PORT: Port number for the database (default:5432).DB_USER: Username for database access.DB_PASSWORD: Password for database access.DB_NAME: Database name.
Ensure that the ragystem_shared-network Docker network is used for communication between containers. Verify it using:
docker network inspect ragystem_shared-network