{"id":34572110,"url":"https://github.com/artefactory/chatbot_experiments","last_synced_at":"2026-05-28T11:31:56.330Z","repository":{"id":328965633,"uuid":"1110716597","full_name":"artefactory/chatbot_experiments","owner":"artefactory","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-16T13:28:38.000Z","size":602,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-20T03:50:28.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/artefactory.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-05T16:00:13.000Z","updated_at":"2025-12-16T13:28:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/artefactory/chatbot_experiments","commit_stats":null,"previous_names":["artefactory/chatbot_experiments"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/artefactory/chatbot_experiments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artefactory%2Fchatbot_experiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artefactory%2Fchatbot_experiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artefactory%2Fchatbot_experiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artefactory%2Fchatbot_experiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artefactory","download_url":"https://codeload.github.com/artefactory/chatbot_experiments/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artefactory%2Fchatbot_experiments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33607334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-12-24T09:40:59.629Z","updated_at":"2026-05-28T11:31:56.325Z","avatar_url":"https://github.com/artefactory.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intelligent Dialog System POC\n\nThis project is a Proof of Concept (POC) for a terminal-based intelligent dialog system that implements a Retrieval Augmented Generation (RAG) architecture.\n\n## Table of Contents\n1.  [Overview](#1-overview)\n2.  [Features](#2-features)\n3.  [Setup](#3-setup)\n4.  [Usage](#4-usage)\n    *   [4.1 Ingesting Web Content](#41-ingesting-web-content)\n    *   [4.1.1 Testing the Ingestion Process](#411-testing-the-ingestion-process)\n    *   [4.2 Running the Chatbot](#42-running-the-chatbot)\n5.  [Project Structure](#5-project-structure)\n\n## 1. Overview\n\nThis project validates RAG logic in a terminal environment. It uses LangGraph for orchestration, a Gemini LLM for generation, and Qdrant for vector storage. The system ingests data from external web pages via a sophisticated, resumable pipeline.\n\n## 2. Features\n\n*   **Local Qdrant:** Runs a local Docker instance of Qdrant for vector storage.\n*   **Intelligent Web Ingestion Pipeline:** A fully automated, resumable pipeline that:\n    1.  **Crawls:** Uses Playwright to fetch JavaScript-rendered HTML from URLs in `data/data_sources.json`.\n    2.  **Processes:** Extracts clean text from the HTML, preserving structure.\n    3.  **Translates:** Performs document-level translation to English using a Gemini LLM.\n    4.  **Chunks \u0026 Ingests:** Splits the translated text into semantically coherent chunks and stores them in Qdrant with metadata.\n*   **RAG Agent:** A LangGraph agent that performs RAG against the ingested data.\n*   **Terminal Interaction:** A simple CLI for interactive Q\u0026A.\n\n## 3. Setup\n\n### Prerequisites\n*   Docker\n*   Python 3.9+\n*   [uv](https://docs.astral.sh/uv/) - Fast Python package installer\n\n### Setup Steps\n1.  **Install uv (if not already installed):**\n    ```bash\n    curl -LsSf https://astral.sh/uv/install.sh | sh\n    ```\n2.  **Start Qdrant:**\n    ```bash\n    docker-compose up -d\n    ```\n3.  **Configure API Key:**\n    Create a `.env` file in the project root and add your Gemini API key:\n    ```\n    GEMINI_API_KEY=\"your_gemini_api_key_here\"\n    ```\n4.  **Create Virtual Environment and Install Dependencies:**\n    ```bash\n    uv venv\n    source .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n    uv pip install -r requirements.txt\n    ```\n5.  **Install Playwright Browsers:**\n    This one-time command is needed to download the browsers for the web crawler.\n    ```bash\n    playwright install\n    ```\n\n## 4. Usage\n\nMake sure your virtual environment is activated before running commands:\n```bash\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n```\n\n### 4.1 Ingesting Web Content\nTo run the entire resumable pipeline (crawl, process, translate, and ingest into Qdrant), use the `--crawl` flag:\n```bash\npython -m src.main --crawl --dir data/crawled/processed\n```\nThis single command will manage all steps. If interrupted, you can run it again to resume where it left off.\n\n### 4.1.1 Testing the Ingestion Process\nTo test the chunking and ingestion directly, you can run the `ingest.py` script, although it's recommended to use the `main.py` script as shown above.\n\n**Prerequisites:**\n*   Qdrant must be running (`docker-compose up -d`).\n*   Virtual environment must be activated.\n*   A valid `GEMINI_API_KEY` must be set in your `.env` file.\n*   At least one translated English text file (`_en.txt`) must exist in `data/crawled/processed/`.\n\n**What to Expect:**\nThe script will ingest new or updated `_en.txt` files, chunk them, and load them into the `web_content` collection in Qdrant.\n\n### 4.2 Running the Chatbot\nOnce data has been ingested, you can start the dialog system for Q\u0026A:\n```bash\npython -m src.main\n```\n\n## 5. Project Structure\n```\n.\n├── data/\n│   ├── crawled/\n│   │   ├── processed/\n│   │   ├── structured/\n│   │   └── progress.json\n│   └── data_sources.json\n├── src/\n│   ├── agent/\n│   ├── gemini/\n│   └── ingestion/\n├── .gitignore\n├── docker-compose.yml\n├── GEMINI.md\n├── phases/\n├── PROGRESS_LOG.md\n└── README.md\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartefactory%2Fchatbot_experiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartefactory%2Fchatbot_experiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartefactory%2Fchatbot_experiments/lists"}