Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Research RAG

A personal-library research assistant: upload papers, search with hybrid retrieval, and get cited answers from your own sources.

This repository is a public architecture snapshot. The production product, labeled eval set, and lab tooling stay in a private repo.

What it is

  • Next.js app — workspaces, document library, chat with citations, closed-beta apply flow
  • Python LangGraph agent — classify → retrieve (hybrid BM25 + vectors, optional rerank) → synthesize → reflect
  • Indexing — PDF/DOCX ingest, strategy-aware chunking, Voyage embeddings
flowchart LR
  UI[Next.js product] -->|chat / upload| Agent[LangGraph agent]
  Agent --> Retrieve[Hybrid retrieval]
  Retrieve --> Mongo[(MongoDB Atlas)]
  Agent --> LLM[Claude]
  UI --> S3[(S3 documents)]
Loading

Stack

Layer Choice
Product Next.js, Clerk, MongoDB, Redis / BullMQ
Agent FastAPI, LangGraph, Anthropic
Retrieval Atlas text + vector search, RRF fusion, Voyage rerank
Eval harness Retrieval metrics + RAGAS runners (example goldset only)

Local run

1 — Product

pnpm install
cp .env.example .env.local
pnpm dev
# http://localhost:3000

2 — Python agent (optional)

cd backend-ai
uv sync --all-groups
cp .env.example .env.local
uv run uvicorn main:app --reload
# http://localhost:8000

Set in the root .env.local to point product chat at Python:

USE_PYTHON_AGENT=true
PYTHON_AGENT_URL=http://127.0.0.1:8000
INTERNAL_API_SECRET=<long random string, same value in backend-ai/.env.local>

Layout

src/            Next.js app
workers/        TypeScript document/analysis workers
backend-ai/    Python LangGraph agent

What is not in this repo

  • Production goldsets, RAGAS numbers, and the goldset generator
  • The 125-paper eval corpus
  • Internal admin / eval consoles
  • Tuned production prompts (files here are short illustrative stubs)

License

Source is published for portfolio display. All rights reserved. Not a license to deploy, sell, or operate a hosted service from this code.

About

Personal-library research assistant: hybrid RAG, LangGraph agent, cited answers from your own papers.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages