Skip to main content

Build, search and ask questions on your study materials — locally.

Project description

StudyGraph · v1.4.2

Carica i tuoi PDF, fai domande, ricevi risposte con citazioni — tutto in locale.

StudyGraph trasforma appunti, dispense e slide in una knowledge base interrogabile con ricerca testuale e semantica. L'interfaccia web ti mostra una mappa visuale dei tuoi materiali, ti permette di chattare con i tuoi documenti in un canvas split-screen e ricevere risposte citate. Funziona offline con --dry-run, senza API key.

StudyGraph Web UI

Requisiti

  • Python >= 3.10
  • Windows, macOS o Linux

Quickstart

# 1. Installa da PyPI
pip install studygraph

# 2. (Opzionale) Crea i file di configurazione
studygraph init

# 3. Avvia l'interfaccia web (apre automaticamente il browser)
studygraph start

# 4. Carica i tuoi PDF dalla pagina Upload, oppure clicca "Prova la demo"

PDF di esempio: la cartella studygraph/demo_pdfs/ contiene 5 PDF sintetici per testare la pipeline completa. Per provare: carica analisi1_good.pdf dalla pagina Upload.

Guida per beta tester: vedi BETA_SETUP.md con istruzioni dettagliate di installazione e primo utilizzo.

Tutto parte dalla pagina Esplora che mostra la tua knowledge base con un grafo visuale. Se non hai ancora documenti, StudyGraph carica automaticamente una demo (Fourier, Limiti, Derivate).

Windows

Su Windows, dopo l'installazione puoi:

  • Usare il terminale: apri PowerShell o CMD e digita studygraph start
  • Usare il launcher: fai doppio clic su start_studygraph.bat (apre automaticamente il browser su http://localhost:8111)

Comandi principali

Comando Cosa fa
studygraph start Avvia tutto: web UI + apre il browser. Il punto di partenza.
studygraph init Crea config.yaml e .env.example nella cartella corrente
studygraph web Avvia l'interfaccia web locale (Esplora, Upload, Dashboard, Documenti, Chat)
studygraph ask "domanda" Risponde a una domanda con citazioni
studygraph search-kb "query" Cerca nella knowledge base (mode: lexical/semantic/hybrid)
studygraph build DIR Pipeline completa: audit -> export -> KB -> indice -> embedding
studygraph demo Demo end-to-end da terminale
studygraph audit DIR Analizza e valuta documenti
studygraph evaluate-retrieval KB DATASET Confronta modalita di retrieval
studygraph evaluate-qa KB DATASET Valuta qualita delle risposte

studygraph start

Il comando principale per iniziare:

studygraph start                  # avvia su http://localhost:8111 e apre il browser
studygraph start --port 8112      # porta custom

studygraph web

Interfaccia web locale con 8 pagine — Esplora, Carica PDF, Documenti, Chat, Dashboard, Impostazioni, Progresso:

studygraph web                    # avvia su http://localhost:8111
studygraph web --port 8112        # porta custom
studygraph web --host 0.0.0.0     # accessibile da altri dispositivi nella rete

Design "Warm Academic" aggiornato: palette calda, mini design system Jinja/CSS, navigazione chiara e zero dipendenze frontend.

Pagina Esplora: mappa visuale della knowledge base (grafo corsi → argomenti → documenti), card esplorabili, statistiche. Se la KB e vuota, trovi un welcome con guida in 3 step e pulsante per la demo.

studygraph build

Pipeline completa in un comando:

studygraph build ./data/input --course "Analisi 1" --dry-run

Opzioni: --dry-run (nessuna API key), --course, --output-dir, --skip-export, --with-embed-real.

studygraph ask

studygraph ask "Che cos'è il limite di una funzione?" --mode hybrid --dry-run
studygraph ask "formule di derivazione" --mode lexical --dry-run --json

Opzioni: --mode lexical|semantic|hybrid, --course, --top-k, --json.

studygraph search-kb

studygraph search-kb "serie di Fourier" --mode lexical
studygraph search-kb "funzioni periodiche" --mode semantic --dry-run
studygraph search-kb "0/0" --mode hybrid --dry-run

studygraph audit (comando base)

studygraph audit ./examples/demo_documents --course "Analisi 1" --dry-run

Processo: ingest -> estrazione testo -> qualita -> dedup -> scoring -> decisione -> dashboard CSV+HTML.

Configurazione

Per usare LLM ed embedding reali, crea .env.local:

STUDYGRAPH_API_KEY=la_tua_chiave
STUDYGRAPH_LLM_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/
STUDYGRAPH_LLM_MODEL=gemini-2.0-flash

Configurazione completa incluso QA generativo:

STUDYGRAPH_QA_PROVIDER=openai_compatible
STUDYGRAPH_QA_API_KEY=la_tua_chiave
STUDYGRAPH_QA_BASE_URL=https://api.openai.com/v1
STUDYGRAPH_QA_MODEL=gpt-4o-mini

Oppure modifica config.yaml. I default puntano a OpenAI (api.openai.com/v1, modello gpt-4o-mini).

Output

Tutto in data/output/:

  • dashboard.csv / .html — report con score e decisioni
  • dashboard_<corso>.csv / .html — per corso
  • documents.jsonl — record completi di scoring
  • knowledge_base/ — KB canonica con catalog + per-course indici
  • search_index/ — indice invertito per ricerca BM25
  • vector_index/ — embedding vettoriali (se generati)
  • eval/ — report di valutazione retrieval e QA
  • demo/ — output del comando demo

Troubleshooting

pkg_resources o pip errori durante l'installazione

Assicurati di avere Python >= 3.10 e pip aggiornato:

python --version
pip install --upgrade pip

studygraph: command not found (Windows)

Assicurati che Python Scripts sia nel PATH:

python -m studygraph web

Oppure reinstalla con pip install -e . e riavvia il terminale.

Porta 8111 gia in uso

studygraph web --port 8112      # usa una porta diversa

PyMuPDF (libreria PDF) non si installa

Su Windows, PyMuPDF ha wheel precompilati. Se l'installazione fallisce, installa prima:

pip install --upgrade pip setuptools wheel
pip install pymupdf

API key non valida o errore LLM

Usa --dry-run per evitare chiamate API:

studygraph build ./data/input --dry-run

Oppure verifica la configurazione in .env.local.

Altri problemi

Apri una issue su GitHub Issues.

Test

pytest          # 247 tests, ~20s

Licenza

MIT — vedi LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

studygraph-1.4.2.tar.gz (86.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

studygraph-1.4.2-py3-none-any.whl (79.2 kB view details)

Uploaded Python 3

File details

Details for the file studygraph-1.4.2.tar.gz.

File metadata

  • Download URL: studygraph-1.4.2.tar.gz
  • Upload date:
  • Size: 86.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for studygraph-1.4.2.tar.gz
Algorithm Hash digest
SHA256 37271416dfff10f9c682819b8e4e9134737b0402ebda15b52f3d9ab4ffe8fdcf
MD5 7a708f58d9bead953ce4b2322701f28c
BLAKE2b-256 528ae9e73cd4237b181acd2a8ca60cd5c9330d97d58df742d6496e651a31e707

See more details on using hashes here.

File details

Details for the file studygraph-1.4.2-py3-none-any.whl.

File metadata

  • Download URL: studygraph-1.4.2-py3-none-any.whl
  • Upload date:
  • Size: 79.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for studygraph-1.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7da18fd407dc0017a0d3685592482824469cf3d502815904a4f913d92c7e2f9
MD5 86b420e7290ea35e0ae52065958ac410
BLAKE2b-256 d38efccffce35d78141d0dfe24603a0e8be8d6d9fad93c2515fb1ccfbb03f14e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page