{"id":29129771,"url":"https://github.com/fedeegmz/hayek-rag","last_synced_at":"2026-04-30T22:35:40.659Z","repository":{"id":300477078,"uuid":"1005258491","full_name":"fedeegmz/hayek-rag","owner":"fedeegmz","description":"A specialized chat application focused on Friedrich August von Hayek, implementing Retrieval-Augmented Generation (RAG) to provide contextually relevant responses based on Hayek's works.","archived":false,"fork":false,"pushed_at":"2026-03-05T19:55:31.000Z","size":252,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T22:35:03.266Z","etag":null,"topics":["ai","artificial-intelligence","fastapi","mongodb","python","rag","uv","voyageai"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fedeegmz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T00:13:18.000Z","updated_at":"2025-07-03T22:40:30.000Z","dependencies_parsed_at":"2025-06-21T23:38:37.689Z","dependency_job_id":null,"html_url":"https://github.com/fedeegmz/hayek-rag","commit_stats":null,"previous_names":["fedeegmz/hayek-rag"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fedeegmz/hayek-rag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedeegmz%2Fhayek-rag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedeegmz%2Fhayek-rag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedeegmz%2Fhayek-rag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedeegmz%2Fhayek-rag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fedeegmz","download_url":"https://codeload.github.com/fedeegmz/hayek-rag/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedeegmz%2Fhayek-rag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32479448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","fastapi","mongodb","python","rag","uv","voyageai"],"created_at":"2025-06-30T03:38:28.034Z","updated_at":"2026-04-30T22:35:35.652Z","avatar_url":"https://github.com/fedeegmz.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hayek RAG\n\nA specialized chat application focused on Friedrich August von Hayek, implementing Retrieval-Augmented Generation (RAG)\nto provide contextually relevant responses based on Hayek's works.\n\n## Description\n\nHayek RAG is a project that allows users to upload PDF documents about Friedrich August von Hayek, processes them to\ngenerate embeddings, and stores this information in a MongoDB database. The application uses these embeddings to\nimplement RAG, enhancing the chat experience by providing responses with relevant context from Hayek's works. Future\nplans include fine-tuning the model to further improve its understanding of Hayek's philosophy and economic theories.\n\n## Features\n\n- PDF document upload and processing\n- Text extraction and chunking\n- Embedding generation using VoyageAI\n- MongoDB storage for documents and embeddings\n- RAG-powered chat interface\n- Context-aware responses based on Hayek's works\n\n## Installation\n\n### Prerequisites\n\n- Python 3.12 or higher\n- MongoDB instance (local or Atlas)\n- VoyageAI API key\n\n### Setting up the environment\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/fedeegmz/hayek-rag.git\n   cd hayek-rag\n   ```\n\n2. Create a virtual environment and install dependencies using `uv`:\n   ```bash\n   uv sync\n   ```\n\n3. Activate a virtual environment:\n   ```bash\n   source .venv/bin/activate  # On Linux/macOS\n   # or\n   .venv\\Scripts\\activate  # On Windows\n   ```\n\n### Configuration\n\nCreate a `.env` file in the project root with the following variables:\n\n```\nMONGODB_URI=\"your_atlas_connection_string\"\nEMBEDDING_API_KEY=\"your_embedding_api_key\"\n```\n\n## Running the Application\n\nStart the FastAPI server:\n\n```bash\n  fastapi dev app/main.py\n```\n\nThe application will be available at http://localhost:8000\n\nAPI documentation is available at:\n\n- http://localhost:8000/docs (Swagger UI)\n\n## Project Structure\n\n```\nhayek-rag/\n├── app/                      # Main application code\n│   ├── core/                 # Core configuration\n│   ├── document/             # Document processing module\n│   │   ├── application/      # Application services\n│   │   ├── domain/           # Domain models and interfaces\n│   │   └── infrastructure/   # Implementation details\n│   ├── shared/               # Shared components\n│   │   ├── domain/           # Shared domain models\n│   │   └── infrastructure/   # Shared infrastructure\n│   └── main.py               # Application entry point\n├── notebooks/                # Jupyter notebooks for experimentation\n├── temp/                     # Temporary files\n├── .env                      # Environment variables (create this file)\n├── pyproject.toml            # Project dependencies\n├── README.md                 # This file\n└── uv.lock                   # Lock file for dependencies\n```\n\n## Development\n\nFor development, the project uses:\n\n- Ruff and Black for code formatting\n- Ruff for linting\n- pre-commit for Git hooks\n\nTo set up the development environment:\n\n```bash\n  pre-commit install\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedeegmz%2Fhayek-rag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffedeegmz%2Fhayek-rag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedeegmz%2Fhayek-rag/lists"}