User Guide¶
Comprehensive guides for using LangCalc in practice.
Contents¶
- Language Models - Working with different model types
- Algebraic Operations - Composing models mathematically
- Context Transformations - Transform context before prediction
- Examples & Patterns - Real-world usage patterns
- Best Practices - Tips and recommendations
Quick Navigation¶
By Use Case¶
- Text generation → Models + Algebra
- Pattern matching → Transformations
- Model mixing → Algebra + Examples
- Performance optimization → Best Practices
By Experience Level¶
- Beginners → Start with Models, then Examples
- Intermediate → Focus on Algebra and Transformations
- Advanced → See Best Practices and Advanced Topics
Common Workflows¶
Workflow 1: Building a Text Predictor¶
- Load corpus and create infinigram model
- Optionally compose with LLM
- Add projections for robustness
- Optimize based on use case
See Examples for details.
Workflow 2: Grounding an LLM¶
- Create infinigram from knowledge base
- Create or load LLM
- Mix with optimal weights (95% LLM + 5% infinigram)
- Evaluate perplexity improvement
See Examples for details.
Workflow 3: Custom Model Composition¶
- Define component models
- Choose algebraic operations
- Tune weights experimentally
- Add temperature scaling if needed
See Algebra for complete operator reference.