Skip to content

MiCrSYZ/micro_agent

Repository files navigation

MicroAgent 🐱

MicroAgent is a LaTeX-native grounded QA agent for academic papers and conference posters. ฅ^•ﻌ•^ฅ

Instead of turning your paper into yet another vague PDF chatbot, MicroAgent builds a paper-specific assistant from the author-side source: sections, figures, tables, captions, labels, equations, optional notes, and rebuttal-style clarifications.

It is designed for poster sessions: print a QR code, let visitors ask the paper what it actually says, and save the author from explaining Figure 3 for the 47th time.

open_source_v1 does not support PDF ingest.

Documentation

Doc Description
docs/quickstart.md Install, build, serve, and eval the public example
docs/architecture.md Pipeline, core vs paper-specific config
docs/deployment.md Local and public poster deployment, QR codes, security
docs/paper_config.md paper.yaml and config file reference
docs/eval_schema.md Eval JSONL schema

Quick start (sanitized demo)

pip install -r requirements.txt

python -m micro_agent.cli build examples/when_adaptation_fails
python -m micro_agent.cli serve examples/when_adaptation_fails --host 127.0.0.1 --port 8000
python -m micro_agent.cli eval examples/when_adaptation_fails \
  --eval-file examples/when_adaptation_fails/eval_sample/questions.jsonl \
  --retrieval-only

Open http://127.0.0.1:8000 and try:

  • What is the main contribution?
  • Why does adaptive gating collapse?
  • What are the limitations?
  • Is this a new SOTA method?
  • Explain Figure 1.

The demo uses sanitized author_notes_sample.md and rebuttal_sample.tex only. It does not ship private advisor notes, full rebuttal letters, or the complete internal eval set.

CLI

python -m micro_agent.cli init papers/my_paper
python -m micro_agent.cli build papers/my_paper
python -m micro_agent.cli serve papers/my_paper
python -m micro_agent.cli eval papers/my_paper --eval-file papers/my_paper/eval_sample/questions.jsonl --retrieval-only
python -m micro_agent.cli eval papers/my_paper --eval-file ... --with-answers
python -m micro_agent.cli qr papers/my_paper --url http://example.com --output poster_qr.png

After pip install -e ., the same commands work as microagent ....

Add your own paper

  1. python -m micro_agent.cli init papers/my_paper
  2. Put public LaTeX/markdown inputs under papers/my_paper/inputs_public/
  3. Edit papers/my_paper/paper.yaml source list
  4. Tune optional configs under papers/my_paper/config/:
    • aliases.yaml — label and term aliases
    • intent.yaml — retrieval intent boosts
    • answer_contract.yaml — grounded answer hints
    • router.yaml — refusal terms and follow-up routing
    • ui.yaml — poster UI title, suggested questions, debug flags
  5. python -m micro_agent.cli build papers/my_paper
  6. python -m micro_agent.cli serve papers/my_paper

See docs/quickstart.md and docs/paper_config.md.

Build outputs

For each paper directory:

build/chunks.jsonl
build/label_index.json
build/vector.index

LLM answers

Copy .env.example to .env and set OPENAI_API_KEY. Any OpenAI-compatible endpoint works via OPENAI_BASE_URL.

Without an API key, the UI still runs and returns retrieval-grounded extractive responses.

Public deployment

See docs/deployment.md for Nginx reverse-proxy setup, QR codes, and the public-demo security checklist.

Project layout

micro_agent/                      # core package
examples/when_adaptation_fails/   # sanitized runnable demo
docs/                             # public documentation
deploy/                           # nginx example
scripts/                          # QR code + helpers
tests/

License

See LICENSE. Demo paper excerpts are sanitized for illustration only.

About

LaTeX-native grounded QA for academic papers and posters. 😺

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors