@terraleiloa/opportunity-extraction
v0.1.0
Published
Reusable opportunity instruction discovery and grant section extraction
Readme
@humandata/opportunity-extraction
Reusable pipeline for:
- Discovering instruction document URLs from an opportunity page (LLM + regex fallback, Grants.gov Simpler API optional).
- Fetching instruction text via injected
DocumentFetcher. - Chunk analysis + synthesis to produce
applicationSections(same contract asLLM_Instruction.md/ document-upload API).
Public API
extractOpportunitySections(input, deps)— main orchestrator.findApplicationInstructionUrls,getGrantsGovInstructionUrlsFromApi— lower-level discovery.parseSectionsFromAnalysisResponse,mapToAppSections— parse Phase-2 JSON.createOpenAiChatLlmClient(openai)— OpenAI v4 adapter.
See examples/second-app/README.md.
Tests
From repo root: pnpm test:opportunity-extraction (after install).
