How lisazhuuu/autoschema works
AutoSchema is a literature-to-structured-data artifact with two phases: it generates queries from seed papers, retrieves and iteratively curates literature, then induces a domain schema; Phase II uses that schema to extract evidence-grounded values from PDFs and write audit and tabular outputs. The README documents these stages and the iterative coordinator. Source excerpts are partial, so detailed links within unsampled retrieval and orchestration code are limited to documented relationships or SOURCE INDEX references.
Main entry points: extract_schema_values.py Extraction Runner · design_extraction_prompt.py Schema Induction · iterative_expand.py Iterative Coordinator · prompt_pipeline.py Query Generation
Components 23
Phase I Discovery
- Query Generation
prompt_pipeline.py - Iterative Coordinator
iterative_expand.py - Literature Retrieval
expand_round.py - Source Search
expand_lib/searches.py - Candidate Preparation
expand_lib/preprocessing.py
Schema Induction
- Schema Induction
design_extraction_prompt.py - Field Proposals
schema_lib/fields.py - Paper Sampling
schema_lib/sampling.py - Schema Refinement
schema_lib/refine.py - Semantic Merge
schema_lib/merge.py
Phase II Extraction
- Extraction Runner
extract_schema_values.py - PDF Text Reading
extract_lib/pdf_io.py - Schema Loading
extract_lib/schema_loader.py - Passage Retrieval
extract_lib/retrieval.py - Extraction Prompt
extract_lib/prompt_builder.py - Value Extraction
extract_lib/llm_extract.py - Result Postprocessing
extract_lib/postprocess.py - Audit and CSV Output
extract_lib/writer.py
Shared Services
- Query Domains
prompt_lib/domain.py - Seed Paper Model
prompt_lib/paper_model.py
Other components
- Researcher
- LLM Provider
- Academic Sources
Connections 26
- Researcher → Iterative Coordinator: starts run
README.md - Researcher → Query Generation: generates queries
README.md - Query Generation → Query Domains: uses domain rules
prompt_pipeline.py - Query Generation → Seed Paper Model: records seeds
prompt_pipeline.py - Iterative Coordinator → Query Generation: orchestrates
README.md - Iterative Coordinator → Literature Retrieval: orchestrates
README.md - Iterative Coordinator → Schema Induction: orchestrates
README.md - Literature Retrieval → Source Search: searches sources
expand_round.py - Literature Retrieval → Candidate Preparation: prepares candidates
expand_round.py - Source Search → Academic Sources: queries
README.md - Schema Induction → Paper Sampling: samples papers
design_extraction_prompt.py - Schema Induction → Field Proposals: proposes fields
design_extraction_prompt.py - Schema Induction → Schema Refinement: refines schema
design_extraction_prompt.py - Schema Induction → Semantic Merge: merges duplicates
design_extraction_prompt.py - Field Proposals → LLM Provider: requests proposals
schema_lib/fields.py - Semantic Merge → LLM Provider: requests merge
- Extraction Runner → PDF Text Reading: reads PDFs
extract_schema_values.py - Extraction Runner → Schema Loading: loads schema
extract_schema_values.py - Extraction Runner → Passage Retrieval: selects passages
extract_schema_values.py - Extraction Runner → Extraction Prompt: builds prompts
extract_schema_values.py - Extraction Runner → Value Extraction: extracts values
extract_schema_values.py - Extraction Runner → Result Postprocessing: postprocesses results
extract_schema_values.py - Extraction Runner → Audit and CSV Output: writes outputs
extract_schema_values.py - Extraction Prompt → Schema Loading: uses schema fields
extract_lib/prompt_builder.py - Passage Retrieval → Schema Loading: scores schema fields
extract_lib/retrieval.py - Value Extraction → LLM Provider: requests extraction
extract_lib/llm_extract.py