ArXivChatGuru

redis-developerMIT更新放缓

用 Streamlit 搭建的论文问答应用,把 arXiv 论文切块存入 Redis 向量库,结合 LangChain 与 OpenAI 实现检索增强问答,还能用语义缓存减少重复调用。

Use ArXiv ChatGuru to talk to research papers. This app uses LangChain, OpenAI, Streamlit, and Redis as a vector database/semantic cache.

暂无版本560star73fork同步于 2026-11-07 07:29 UTC

怎么上手

由 README 提炼,执行前请确认
cp .env.template .env
make docker-up
硬件要求按 README 说明

README 未说明显存或 GPU 要求,本地开发需 Python 3.13,Docker 流程需 Docker Desktop,另需可访问的 Redis 实例

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用 Streamlit 把 arXiv 论文灌进 Redis 向量库,做主题范围内的论文问答

用 Streamlit 搭建的论文问答应用,把 arXiv 论文切块存入 Redis 向量库,结合 LangChain 与 OpenAI 实现检索增强问答,还能用语义缓存减少重复调用。

核心能力

  • 按主题抓取 arXiv 论文并切分成 chunk
  • 用 OpenAI embedding 生成向量存入 Redis 索引
  • LangChain 检索最相近 chunk 作为上下文回答
  • 内置 stats 页查看索引元数据与字段
  • 按主题隔离索引,避免不同论文混在一起

容易踩的坑

必须在 .env 里填 OPENAI_API_KEY,否则无法生成 embedding 和回答;Docker 默认 REDIS_URL 指向 arxivchatguru-redis 主机名,本地裸跑要改成 redis://localhost:6379;应用默认开在 8501 端口,需先加载主题后才能看 stats 页

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    ArXiv ChatGuru

    ArXiv ChatGuru is a Streamlit app that turns a topic from arXiv into a topic-scoped Redis vector index. It fetches papers, chunks them, stores embeddings in Redis, and lets you ask grounded questions against the papers you loaded.

    This app is a learning project for academic RAG. It is intentionally simple and is meant to show how Redis fits into a paper Q&A workflow, not to act as a production-ready research assistant.

    What Redis does in this app

    • Stores topic-specific paper chunks and embeddings
    • Powers vector search for retrieval
    • Lets you inspect the active index from the built-in stats page

    How it works

    1. Enter a topic and choose how many papers to load.
    2. The app pulls papers from arXiv and splits them into chunks.
    3. OpenAI generates embeddings for those chunks.
    4. Redis stores the chunks and embeddings in a topic-scoped index.
    5. LangChain retrieves the closest chunks for each user question and sends that context to the chat model.

    Architecture diagram Architecture diagram

    Prerequisites

    • Python 3.13 for local development
    • Docker Desktop if you want the Docker-first flow
    • An OpenAI API key

    Environment setup

    Create a .env file from the template:

    cp .env.template .env
    

    Then set at least:

    OPENAI_API_KEY=your_key_here
    

    The default template uses:

    • OPENAI_CHAT_MODEL=gpt-4.1-mini
    • OPENAI_EMBEDDING_MODEL=text-embedding-3-small
    • REDIS_INDEX_BASENAME=arxiv
    • REDIS_URL=redis://arxivchatguru-redis:6379

    Run with Docker

    Docker is the primary local path.

    make docker-up
    

    Then open:

    http://localhost:8501
    

    To stop the stack:

    make docker-down
    

    Run locally

    Install Poetry if you do not already have it:

    python3 -m pip install --user poetry
    

    Use Python 3.13 for the project environment, install dependencies, and start the app:

    python3 -m poetry env use python3.13
    make install
    make dev
    

    Then open:

    http://localhost:8501
    

    If you run locally outside Docker, make sure REDIS_URL points at a reachable Redis instance such as redis://localhost:6379.

    Developer commands

    • make format formats the app and tests
    • make test runs the test suite
    • make build builds the Docker image
    • make dev starts Streamlit locally
    • make docker-up starts the app with Docker Compose

    Stats page

    After you load a topic from the main page, open the Streamlit stats page to inspect the active Redis index. It shows:

    • Index metadata
    • Indexed fields
    • Query Engine stats for the active topic

    Planned follow-ups

    • Add better metadata filters such as year or author
    • Improve chunking strategy for long papers
    • Add chat history or memory features only if the tutorial needs them