本地LLM-RAG 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
本地LLM-RAG 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
本地LLM-RAG 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install local-llm-with-rag
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install local-llm-with-rag
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/amscotti/local-LLM-with-RAG
cd local-LLM-with-RAG
pip install -e .
# 验证安装
python -c "import local_llm_with_rag; print('安装成功')"
# 命令行使用
local-llm-with-rag --help
# 基本用法
local-llm-with-rag input_file -o output_file
# Python 代码中调用
import local_llm_with_rag
# 示例
result = local_llm_with_rag.process("input")
print(result)
# local-llm-with-rag 配置文件示例(config.yml) app: name: "local-llm-with-rag" debug: false log_level: "INFO" # 运行时指定配置文件 local-llm-with-rag --config config.yml # 或通过环境变量配置 export LOCAL_LLM_WITH_RAG_API_KEY="your-key" export LOCAL_LLM_WITH_RAG_OUTPUT_DIR="./output"
<p align="center"> <img src="images/wizard_experimenting.jpg" alt="A wizard experimenting - Leonardo AI" width="600"> </p>
This project is an experimental sandbox for testing out ideas related to running local Large Language Models (LLMs) with Ollama and Pydantic AI to perform agentic Retrieval-Augmented Generation (RAG) for answering questions based on your documents. The agent can decide when and how to search documents, unlike fixed RAG pipelines. We use Ollama to create embeddings with nomic-embed-text stored in LanceDB for vector search.
<p align="center"> <img src="images/streamlit_ui.png" alt="Screenshot of Streamlit web UI" width="600"> </p>
Important: The selected LLM must support tool calling (function calling). The application uses an agentic approach where the model decides when to search documents, which requires tool calling capability. Models without this feature will not work correctly—they may fail silently, output raw tool syntax, or ignore documents entirely.
Not all Ollama models support tool calling reliably. We tested several model families and sizes to find the best options for this RAG application.
Recommended Models (Benchmarked): - qwen3.5:9b - Best overall: highest quality (4.3/5 avg on 14-question eval), ~40% faster than qwen3:8b, multimodal (vision), 256K context. Current default. - qwen3:8b - Strong alternative (4.4/5), slightly slower. Reliable tool calling. - qwen3:14b - Same quality tier as 8b/9b but ~50% slower. No quality advantage for this RAG task.
These models were benchmarked using an automated eval harness (bench/) with a 480B cloud model (qwen3-coder) as the LLM judge. All three handle tool calling reliably and produce accurate, well-formatted answers.
Not recommended for agentic RAG: - lfm2.5:8b-a1b - Fast (26s/question) but unreliable: failed to call the search tool on 30% of questions. Only ~1B active parameters (despite the 8B label).
Why Model Size Matters:
Smaller models (under 8B parameters, or hybrid models with few active parameters) struggle with agentic RAG tasks: - They may fail to call the search tool when needed - They often hallucinate instead of searching documents - Some get stuck in search loops, calling the tool repeatedly without converging
The app includes safeguards (thinking-mode disabled, 4-search cap per question) to keep responses responsive and prevent runaway behavior.
uv sync高质量开源AI工作流,运行本地语言模型
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,本地LLM-RAG 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | local-LLM-with-RAG |
| 原始描述 | 开源AI工作流:Running local Language Language Models (LLM) to perform Retrieval-Augmented Gene。⭐284 · Python |
| Topics | chatbotembeddingspython |
| GitHub | https://github.com/amscotti/local-LLM-with-RAG |
| License | MIT |
| 语言 | Python |
收录时间:2026-07-04 · 更新时间:2026-07-04 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端