{"repo": "charmingdaidai/hisem-rag", "files": {"README.md": {"d25bbed5b64a380213bef3479d2c2f75fb7e494a": {"t": 1785846844.7321947, "n": 1720, "h": "a72aca219925b1ab", "c": "# HiSem-RAG\n\n## Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/CharmingDaiDai/HiSem-RAG.git\ncd HiSem-RAG\n```\n\n2. Install the required dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\nThe main dependencies include:\n\n- numpy\n- pydantic\n- httpx\n- openai\n- PyYAML\n- tqdm\n- loguru\n\n## Configuration\n\nBefore running the code, you need to configure the model API credentials in the `config.yaml` file:\n\n1. **Local Embedding Model**:\n\n - Update the `base_url` to your embedding model URL\n - Make sure the `embedding_model` is properly set (default is \"bge-m3\")\n\n ```yaml\n models:\n local:\n api_key: \"not empty\"\n base_url: \"your embedding model url\"\n embedding_model: \"bge-m3\"\n ```\n2. **LLM Model (Zhipu AI)**:\n\n - Set your Zhipu AI API key\n - The base URL is pre-configured as \"https://open.bigmodel.cn/api/paas/v4/\"\n - You can change the model name (default is \"glm-4-flash\")\n\n ```yaml\n models:\n zhipu:\n api_key: \"your zhipu ai key\"\n base_url: \"https://open.bigmodel.cn/api/paas/v4/\"\n model_name: \"glm-4-flash\"\n ```\n3. **Select Active LLM**:\n\n - Set the `active_llm` parameter to choose which LLM to use (default is \"zhipu\")\n\n ```yaml\n models:\n active_llm: \"zhipu\"\n ```\n\n## Running the Code\n\nTo run the HiSem-RAG system:\n\n```bash\npython main.py\n```\n\nAdditional Configuration Options\n\nThe `config.yaml` file contains several other parameters you can customize:\n\n- **Path Configuration**: Base directories for questions, documents, logs, and results\n- **Retrieval Algorithm Parameters**: Thresholds, sensitivity coefficients, and search depth\n- **System Parameters**: Threading configuration and logging levels\n"}}}}