| """ |
| Reason-First Program: Concept-Guided Program Space Exploration |
| |
| When an LLM fills a stub function, there exists a *possible program space* of valid |
| implementations. This framework discovers semantic CONCEPTS that characterize regions |
| of that space, projects programs into concept-guided embeddings, and provides a query |
| language for steering generation. |
| |
| Architecture: |
| Stage 1 - Sampling: Generate diverse valid implementations of a stub |
| Stage 2 - Discovery: Surface concepts from execution behavior, hidden states, and abstractions |
| Stage 3 - Embedding: Build concept-guided projections; verify alignment |
| Stage 4 - Steering: Query language to navigate the space by composing concepts |
| """ |
|
|
| __version__ = "0.1.0" |
|
|
| from reason_first_program.stub import reason_first, Stub, StubRegistry |
| from reason_first_program.program_space import ProgramSpace, Program |
| from reason_first_program.concepts import ( |
| Concept, |
| ConceptSet, |
| BehavioralConceptDiscovery, |
| SAEConceptDiscovery, |
| AbstractionConceptDiscovery, |
| UnifiedConceptDiscovery, |
| ) |
| from reason_first_program.embeddings import ( |
| ConceptBottleneckAE, |
| GCAVEmbedding, |
| ConceptEmbeddingSpace, |
| ) |
| from reason_first_program.steering import ( |
| ConceptQuery, |
| SteeringEngine, |
| QueryLanguage, |
| ) |
| from reason_first_program.sampling import ProgramSampler, DiverseSampler |
|
|
| __all__ = [ |
| "reason_first", |
| "Stub", |
| "StubRegistry", |
| "ProgramSpace", |
| "Program", |
| "Concept", |
| "ConceptSet", |
| "BehavioralConceptDiscovery", |
| "SAEConceptDiscovery", |
| "AbstractionConceptDiscovery", |
| "UnifiedConceptDiscovery", |
| "ConceptBottleneckAE", |
| "GCAVEmbedding", |
| "ConceptEmbeddingSpace", |
| "ConceptQuery", |
| "SteeringEngine", |
| "QueryLanguage", |
| "ProgramSampler", |
| "DiverseSampler", |
| ] |
|
|