Expand description
Legalis-LLM: LLM integration layer for Legalis-RS.
This crate provides an abstraction layer for LLM providers, enabling pluggable AI models (OpenAI, Anthropic, Gemini, Local LLMs).
Modules§
- ab_
testing - A/B testing for prompts.
- audio_
transcription - Audio transcription utilities for court recordings and legal audio.
- chaos
- Chaos testing utilities for resilience verification.
- dashboard
- Custom metrics dashboard system.
- embedding_
utils - Utilities for working with embeddings.
- errors
- Error injection for testing error handling paths.
- helpers
- Helper macros and utilities for common function patterns.
- human_
feedback - Human feedback integration for RLHF (Reinforcement Learning from Human Feedback).
- incremental
- Incremental compilation support for law compiler.
- inference_
rules - Common inference rules
- integration_
utils - Integration utility functions.
- legal_
document_ analysis - Legal document analysis module for multi-modal inputs.
- legal_
finetuning - Legal domain fine-tuning utilities.
- optimization
- Prompt optimization suggestions and analysis.
- otel
- OpenTelemetry integration for distributed tracing.
- pdf_
parsing - PDF parsing utilities for legal documents.
- pipeline
- Compilation pipeline with configurable stages.
- processors
- Pre and post processors for custom compilation logic.
- progress
- Progress tracking for LLM operations.
- rag_v2
- RAG 2.0 features for advanced retrieval.
- rules
- Advanced validation rules beyond simple JSON schema.
- stream_
utils - Stream combinators for transforming text streams.
- video_
analysis - Video analysis utilities for evidence review.
Structs§
- ABTest
- A/B testing framework for comparing fine-tuned models.
- ABTest
Analysis - A/B test analysis results.
- ABTest
Result - A/B test result comparison.
- AISuggestion
- AWQConfig
- AWQ (Activation-aware Weight Quantization) configuration.
- Access
Control Manager - Access control manager
- Access
Permission - Access
Role - Accuracy
Issue - Accuracy issue found during validation
- Accuracy
Validation - Legal accuracy validation result
- Active
Learner - Active learning system with human feedback.
- Active
Learning Stats - Adversarial
Detector - Adversarial detector for prompt injection and attacks
- Agent
Orchestrator - Multi-agent orchestrator for coordinating legal analysis tasks.
- Agent
Result - Result from an agent’s analysis or task.
- Agent
Task Result - Agent task result with detailed information.
- Aggregated
Metrics - Aggregated metrics across multiple requests.
- Amendment
- Amendment to a legal rule
- Analysis
Report - Report from statute analysis.
- Anonymization
Pipeline - Data anonymization pipeline
- Anonymization
Rule - Anthropic
Client - Anthropic Claude client.
- Async
Cache - Async-aware cache using tokio primitives for better async performance.
- Attack
Detection Result - Adversarial attack detection result
- Attention
Weights - Attribution
Report - Audit
Entry - Audit
LogEntry - Audit log entry for LLM operations.
- Audit
Logger - Audit logger for tracking LLM operations.
- Audit
Trail - Audit trail for tracking operations
- Auto
Scaler - Auto-scaler for LLM deployments.
- Auto
Scaling Config - Auto-scaling configuration.
- Autonomous
Orchestrator - Autonomous legal intelligence orchestrator.
- Autonomous
Stats - Azure
Open AiClient - Azure OpenAI client.
- Batch
Config - Configuration for batch processing.
- Batch
Processor - Batch processor for LLM requests.
- Batch
Queue - Batching queue for LLM requests.
- Batch
Result - Result of batch processing with statistics.
- Behavior
Prediction - Behavior prediction result
- Behavioral
Tendencies - Behavioral tendencies
- Benchmark
Result - Result of running a benchmark on a single task.
- Benchmark
Stats - Aggregated benchmark statistics across multiple tasks.
- Benchmark
Suite - Benchmark suite for comparing models.
- Benchmark
Task - A benchmark task to evaluate models.
- Bias
Detection Result - Result of bias detection.
- Bias
Detector - Bias detector using pattern matching.
- Bias
Instance - A specific instance of detected bias.
- Breach
Analysis - Breach analysis
- Budget
Limit - Budget limits for token usage.
- Budget
Status - Current budget status.
- Budget
Tracker - Token tracker with budget management.
- Business
Operation - Business operation
- Cache
Config - Configuration for the response cache.
- Cache
Stats - Statistics for cache performance.
- Cache
Warmer - Cache warming utility for preloading common prompts.
- Cached
LawCompiler - Law compiler with caching support.
- Cached
Provider - A wrapper around an LLM provider that adds caching.
- Cached
Response - A cached response with metadata.
- Calibration
Bin - A bin in the calibration curve.
- Calibration
Metrics - Confidence calibration metrics.
- Calibration
Point - Confidence calibration data point.
- Cancellable
Stream - A wrapper that adds cancellation support to text streams.
- Cancellation
Context - Context for managing cancellable LLM operations.
- Cancellation
Guard - Guards a stream with multiple cancellation conditions.
- Case
Analysis Output - Structured case analysis output.
- Case
Analyzer - Case analyzer that produces structured output.
- Case
Citation - Legal citation edge between cases
- Case
Features - Case features for prediction
- Case
LawAnalysis - Case law analysis result.
- Case
Node - Legal case node in citation network
- Case
Outcome - Case outcome prediction result
- Case
Outcome Predictor - Case outcome predictor
- Case
Parties - Parties in a case.
- Case
Result - Result for a single case.
- Causal
Event - Causal event in a legal scenario
- Causal
Graph - Causal graph for legal scenarios
- Causal
Link - Causal link between events
- Causation
Analysis - Result of causation analysis
- Chain
Execution Result - Result of executing a prompt chain.
- Chain
Node - A node in a prompt chain representing a single step.
- Chain
OfLaw Prompter - Chain-of-law prompter for step-by-step legal reasoning.
- Chain
OfLaw Result - Complete chain-of-law reasoning result.
- Chain
OfThought - Chain-of-thought prompting builder.
- Chain
OfThought Builder - Chain-of-thought prompt builder
- Chain
OfThought Logger - Chain-of-thought logger.
- Change
- Change in document
- Change
Summary - Change summary
- Circuit
Breaker - Circuit breaker for LLM providers.
- Circuit
Breaker Config - Configuration for circuit breaker.
- Citation
- Citation
Cluster - Citation cluster (community)
- Citation
Evolution - Citation evolution over time
- Citation
Extractor - Legal citation extractor.
- Citation
Grounded Prompter - Citation-grounded generation prompter.
- Citation
Grounded Result - Citation-grounded generation result.
- Citation
Network - Legal citation network graph
- Citation
Support - Citation support for a specific claim.
- Clause
Classification - Clause classification result
- Clause
Classifier - Clause classifier
- Clause
Ranker - Clause suggestion ranker.
- Clause
Template - Cluster
Stats - Statistics for the inference cluster.
- Cohere
Client - Cohere client for natural language understanding.
- Collaborative
Editor - Real-time collaborative AI editor.
- Collaborative
Session - Represents a collaborative editing session.
- Comparison
- Comparison between scenarios
- Compilation
Cache - Compilation cache for statutes.
- Compiled
Rule - Compiled legal rule
- Compliance
Checker - Compliance checker
- Compliance
Monitoring Agent - Compliance Monitoring Agent.
- Compliance
Provider - Provider wrapper that adds compliance and safety features.
- Compliance
Report - Compliance report
- Compliance
Requirement - Compliance requirement
- Compliance
Result - Compliance simulation result
- Compliance
Simulator - Regulatory compliance simulator
- Compliance
Violation - Compliance violation
- Concept
- Concept
Relation - Condition
Schema - Schema for a condition in a rule.
- Conditional
Execution - Conditional execution rules.
- Confidence
Calibrator - Confidence calibration reporter.
- Confidentiality
Protector - Confidentiality protector for filtering sensitive information.
- Conflict
Resolution - Conflict resolution result
- Connection
Pool - Connection pool for LLM providers
- Connection
Pool Stats - Consent
Record - Constitutional
Prompt - Constitutional AI prompting helpers.
- Constraint
- Constraint between variables
- Constraint
Problem - Constraint satisfaction problem
- Constraint
Solver - Symbolic constraint solver
- Context
Aware Selector - Context-aware prompt selector
- Context
Compressor - Context compression for reducing token usage.
- Context
Importance - Context importance scorer.
- Context
Importance Scorer - Context importance scorer for prioritizing relevant content.
- Context
Pruner - Automatic context pruner.
- Continual
Learner - Continual learning system without catastrophic forgetting.
- Continual
Learning Stats - Continual
Transfer Learner - Continual learner to prevent catastrophic forgetting
- Contract
Analysis - Contract analysis result.
- Contract
Clause - Contract clause information.
- Contract
Event - Contract event
- Contract
Optimization Recommendation - Contract
Optimizer - Contract optimization recommender.
- Contract
Review Agent - Contract Review Agent.
- Contract
Scenario - Contract scenario
- Contract
Scenario Simulator - Contract scenario simulator
- Contract
Terms - Contract terms
- Conversation
- A conversation with message history and context management.
- Conversation
Config - Configuration for conversation management.
- Conversation
Manager - A conversation manager that integrates with an LLM provider.
- Conversation
Optimizer - Multi-turn conversation optimizer
- Conversation
Turn - Cost
Analytics - Analytics for cost data.
- Cost
Anomaly - Cost anomaly detection result.
- Cost
Estimate - Cost estimate
- Cost
Estimator - Cost estimation for different LLM providers and models.
- Cost
Optimizer - Cost optimizer with recommendations.
- Cost
Record - Cost record for a single LLM request.
- Counterfactual
Explanation - Counterfactual
Generator - Counterfactual explanation generator.
- Counterfactual
Result - Result of counterfactual analysis
- Counterfactual
Scenario - Credential
Manager - Secure credential manager
- Cross
Jurisdictional Influence - Cross-jurisdictional influence
- Cross
Lingual Analysis - Cross-lingual legal analysis result
- Cross
Lingual Analyzer - Cross-lingual legal analyzer
- Cross
Lingual Transfer - Cross-lingual transfer engine
- Data
Subject Request - Dataset
Builder - Dataset preparation utilities.
- Dataset
Stats - Dataset statistics.
- Decision
Audit Trail - Decision audit trail.
- Decision
Record - A single decision in an audit trail.
- Deep
Seek Client - DeepSeek client for advanced reasoning models.
- Deployment
Builder - Builder for LLM deployment specifications.
- Deployment
Condition - Condition of a deployment.
- Deployment
Metadata - Metadata for LLM deployments.
- Deployment
Metrics - Current metrics for a deployment.
- Deployment
Spec - Specification for LLM deployment.
- Deployment
Status - Status of an LLM deployment.
- DetectedPII
- Detected PII in text.
- Detection
Pattern - Detection pattern for adversarial content
- Difference
- Document difference
- Disclaimer
Generator - Disclaimer generator for legal content
- Disk
Cache - Disk-based cache persistence.
- Dispute
Resolution Agent - Dispute Resolution Agent.
- Distillation
Config - Distillation
Stats - Distributed
Inference - Distributed inference coordinator.
- Distributed
Provider - Distributed provider wrapper that distributes requests across nodes.
- Document
Chunk - A chunk of a document with metadata.
- Document
Chunker - Document chunker.
- Document
Comparator - Document comparator
- Document
Comparison - Document comparison result
- Document
Quality Score - Document quality score
- Document
Quality Scorer - Document quality scorer
- Document
Structure - Document structure
- Document
Structure Analyzer - Document structure analyzer
- Document
Version - Domain
Adaptation Config - Domain adaptation configuration
- Domain
Adapter - Domain adapter for transferring knowledge between legal specialties
- Domain
Invariant Extractor - Domain-invariant feature extractor
- Domain
Model - Domain
Prompt Library - Domain-specific prompt library
- Drafter
Agent - Drafter agent for creating legal documents.
- Dynamic
Prompt Template - Dynamic prompt template with variable substitution
- Edge
Config - Edge inference configuration.
- Edge
Deployment - Edge deployment manager.
- Edge
Manifest - Model deployment manifest for edge devices.
- Edge
Profile - Edge device profile describing resource constraints.
- Edge
Provider - Edge-optimized LLM provider wrapper.
- Edge
Stats - Edge inference statistics.
- Edit
Operation - An edit operation in a collaborative session.
- Effect
Schema - Schema for an effect in a rule.
- Embedding
- A vector embedding representation of text.
- Encrypted
Data - Encrypted data container with metadata
- Encryption
Service - Simple encryption service (in production, use proper crypto libraries)
- Entity
- Represents an entity in the legal knowledge graph.
- Entity
Extractor - Entity extractor for legal documents.
- Entity
Pattern - Ethical
Boundary Enforcer - Ethical boundary enforcer
- Ethical
Check - Ethical boundary check result
- Ethical
Rule - Ethical rule
- Ethical
Violation - Ethical violation
- Evaluation
Benchmark - Model evaluation benchmark.
- Evaluation
Case - Single evaluation test case.
- Evaluation
Metrics - Overall evaluation metrics.
- Evaluation
Result - Result of evaluating a model on a benchmark.
- Explainable
Model - Explainable neuro-symbolic model
- Explanation
- Explanation
Explorer - Interactive explanation explorer.
- Explanation
Generator - Natural language explanation generator.
- Explanation
Style - Explanation
Template - Exploration
Step - Extracted
Date - Extracted date
- Extracted
Entities - Extracted entities
- Fact
Store - Memory store for storing and retrieving context information.
- Fallback
Provider - A provider that tries two providers in sequence, falling back to the second if the first fails.
- Feature
Attribution - Feature
Attributor - Feature attribution analyzer.
- Federated
Config - Federated learning configuration
- Federated
Coordinator - Federated learning coordinator
- Federated
Node - Federated learning participant (e.g., law firm, court, legal department)
- Federated
Statistics - Federated learning statistics
- FewShot
Example - Few-shot learning example
- FewShot
Generator - Few-shot learning prompt generator
- FewShot
Learner - Few-shot learner for new legal domains
- FewShot
Prompt Example - File
Store - File-based conversation store (JSON).
- Fine
Tuning Dataset - Fine-tuning dataset with train/validation split.
- Fine
Tuning Example - Fine-tuning dataset format.
- Fixture
Provider - Provider that plays back recorded fixtures.
- Fixture
Set - A collection of response fixtures.
- Form
Field - Form field definition.
- Function
- A function that can be called by an LLM.
- Function
Call - A function call request from the LLM.
- Function
Definition - Function definition for API requests.
- Function
Orchestrator - Function orchestrator for advanced execution patterns.
- Function
Parameters - Function parameters schema (JSON Schema).
- Function
Registry - A registry of functions that can be called by LLMs.
- Function
Result - Result of a function execution.
- GDPR
Compliance - GDPR compliance utilities
- GGUF
Loader - GGUF model loader for llama.cpp compatible models.
- Gemini
Client - Google Gemini client.
- Generated
Audio - Represents generated or returned audio in a response.
- Generated
Image - Represents a generated or returned image in a response.
- Generated
Prompt - Generated prompt with metadata
- GpuBatch
Config - GPU batching configuration.
- GpuDevice
- GPU device information.
- GpuScheduled
Provider - LLM provider with GPU scheduling.
- GpuScheduler
- GPU scheduler for managing inference requests.
- GpuSlot
- GPU slot representing an acquired GPU resource.
- Grammar
Guided Decoder - Grammar-guided decoder.
- Grammar
Rule - Grammar rule for guided decoding.
- Groq
Client - Groq client for ultra-fast inference.
- Guarded
Provider - LLM provider with safety guardrails.
- Guardrails
Config - Guardrails configuration for LLM safety.
- Hallucination
- Detected hallucination
- Hallucination
Detection - Hallucination detection result
- Hallucination
Detector - Hallucination detector
- Haystack
Document - Haystack-compatible document format.
- Header
- Document header
- Health
Checker - Health checker for LLM providers.
- Health
Stats - Health check statistics.
- Hierarchical
Summarizer - Hierarchical summarization manager.
- Historical
Case - Historical case data
- HotSwappable
Provider - Hot-swappable provider wrapper.
- Hugging
Face Client - HuggingFace Inference API client.
- Human
Feedback - Hybrid
Inference - Hybrid classical-quantum inference system.
- Hybrid
Reasoner - Hybrid neuro-symbolic reasoner
- Hybrid
Search - Hybrid search combining semantic and keyword search.
- InMemory
Document Store - In-memory document store.
- InMemory
Store - In-memory conversation store.
- Incremental
Processor - Incremental processor with checkpoint support
- Inference
Node - Node information for distributed inference.
- Inference
Result - Inference
Rule - Inference rule for deriving new relations
- Interactive
Explanation - Invalidatable
Cache - Advanced cache with invalidation strategies.
- Invalidatable
Cache Entry - Cache entry with invalidation metadata.
- Jargon
Normalizer - Legal jargon normalizer
- Json
Schema - A simple JSON schema validator.
- Json
Schema Constraint - JSON schema for constrained generation.
- Json
Schema Generator - JSON schema-constrained generator.
- Judge
Behavior Model - Judge/jury behavior model
- Judicial
Decision - Judicial decision
- Jurisdiction
Filter - Jurisdiction-aware safety filter.
- Jurisdiction
Info - Legal jurisdiction information with language and system metadata
- Jurisdiction
Rules - Translation rules specific to a jurisdiction
- Jurisdiction
Transfer - Jurisdiction transfer engine for cross-jurisdictional knowledge transfer
- Jurisdiction
Translator - Jurisdiction-aware translator
- Jurisdiction
Validation Rules - Rules for a specific jurisdiction (validation context)
- K8sMetrics
Collector - Collects metrics from LLM deployments in Kubernetes.
- Knowledge
Change - Knowledge
Compiler - Legal knowledge compiler
- Knowledge
Distiller - Legal knowledge distillation system.
- Knowledge
Extractor - Automatic knowledge extraction from legal text.
- Knowledge
Graph Reasoner - Knowledge graph reasoning engine.
- Knowledge
Graph Stats - Knowledge
Snapshot - LLMConfig
- Configuration for LLM requests.
- LLMDeployment
- Custom Resource Definition for LLM deployments.
- LLMOperator
- Kubernetes operator for LLM deployments.
- LLMSummarizer
- LLM-based conversation summarizer.
- Lang
Chain Message - LangChain-compatible message format.
- Lang
Chain Prompt Template - LangChain-compatible prompt template.
- LawCompiler
- Compiles natural language legal text into structured Statute objects.
- Layperson
Summarizer - Layperson-friendly summary generator.
- Lazy
Document Loader - Lazy document loader for efficient large document handling
- Learning
Strategy - Legal
Accuracy Validator - Legal accuracy validator
- Legal
Adversarial Protection - Legal-specific adversarial protection
- Legal
Analysis Chain Builder - Builder for creating legal analysis chains.
- Legal
Analysis Workflow - Multi-step legal analysis workflow result.
- Legal
Analysis Workflow Prompter - Multi-step legal analysis workflow prompter (IRAC method).
- Legal
Argument - Legal argument structure.
- Legal
Causation Analyzer - Legal causation analyzer
- Legal
Change - Detected legal change
- Legal
Change Detector - Legal change detection
- Legal
Citation - Citation extracted from a legal document.
- Legal
Concept - Legal concept in an ontology
- Legal
Disclaimer - Legal disclaimer to be added to LLM responses.
- Legal
Document Summarizer - Legal document summarizer.
- Legal
Document Summary - Summary of a legal document.
- Legal
Entity - Entity extracted from legal text.
- Legal
Entity Extractor - Legal entity extractor
- Legal
Expert Agent - Legal expert agent for statute interpretation.
- Legal
Federated Learning - Legal domain specific federated learning
- Legal
Form Filler - Legal form filler using AI.
- Legal
Form Template - Legal form template.
- Legal
Knowledge Graph - Legal knowledge graph with entity-relationship mapping.
- Legal
Meta Prompting - Legal-specific meta-prompting
- Legal
Ontology - Legal ontology
- Legal
Ontology Builder - Legal ontology builder for common legal domains
- Legal
Reasoning Step - Chain-of-law reasoning step.
- Legal
Reference - Legal reference
- Legal
Relation - Relationship between legal concepts
- Legal
Relationship - Relationship between legal entities or statutes.
- Legal
Research Agent - Autonomous Legal Research Agent.
- Legal
Scenario - Legal scenario for what-if analysis
- Legal
Snapshot - Snapshot of a legal rule at a point in time
- Legal
Task - Multi-task learning task definition
- Library
Statistics - Litigation
Risk - Litigation risk assessment result
- Litigation
Risk Assessor - Litigation risk assessor
- Llama
CppClient - llama.cpp server client for direct local LLM inference.
- Llama
Index Document - LlamaIndex-compatible document format.
- LoRA
Adapter - LoRA adapter metadata and weights.
- LoRA
Config - LoRA (Low-Rank Adaptation) configuration.
- Load
Balancer - Load balancer that distributes requests across multiple providers.
- Local
Embedding - Local embedding provider using sentence transformers via Ollama or similar.
- Logging
Hook - A simple logging hook for debugging.
- Logic
Guided Generator - Logic-guided neural generator
- Memory
Augmented Prompt - Memory-augmented prompt builder.
- Memory
Augmented Provider - Memory-augmented provider wrapper.
- Memory
Config - Configuration for memory-augmented generation.
- Memory
Entry - A memory entry in the memory store.
- Memory
Item - Memory
Mapped Reader - Memory-mapped file reader for large documents
- Memory
Store - Memory store for storing and retrieving memories.
- Message
- A single message in a conversation.
- Meta
Learner - Meta-learning system for legal domains.
- Meta
Prompt - Meta-prompt for generating task-specific prompts
- Meta
Prompting Engine - Meta-prompting engine for automated prompt generation
- Meta
Prompting Statistics - Statistics about meta-prompting
- Metrics
Collector - Metrics collector for LLM operations.
- Metrics
History - Training metrics history.
- Missing
Clause Detector - Missing clause detector
- Missing
Clause Report - Missing clause report
- Mistral
Client - Mistral AI client.
- Mock
Provider - Mock LLM provider for testing.
- Model
Limits - Model token limits for common models.
- Model
Pricing - Pricing information for a model.
- Model
Router - Model router that selects providers based on routing strategy.
- Model
Update - Model update from a federated node
- Model
Version - Model version information.
- Moderation
Result - Moderation result for content.
- Monetary
Amount - Monetary amount
- Multi
Modal Message - A multi-modal message with text and/or images.
- Multi
Modal Prompt Builder - Builder for creating multi-modal prompts easily.
- Multi
Modal Response - Represents a parsed multi-modal response from an LLM.
- Multi
Task Learner - Multi-task learning framework
- Multi
Tenancy Manager - Multi-tenancy manager
- Multilingual
Legal Concept - Legal concept with multilingual support
- NegotiationAI
- Multi-stakeholder negotiation AI.
- Negotiation
Assistance Agent - Negotiation Assistance Agent.
- Negotiation
Party - Negotiation party
- Negotiation
Round - Negotiation round
- Negotiation
Simulation - Negotiation simulation
- Negotiation
State - Network
Statistics - Network statistics
- Neural
Rule - Neural-symbolic rule
- Neuro
Symbolic Explanation - Explanation for a neuro-symbolic prediction
- Normalization
Rule - Normalization rule for legal jargon
- Observable
Provider - LLM provider with metrics collection.
- Ollama
Client - Ollama client for local LLM support.
- Ontology
Learner - Legal concept ontology learner.
- Ontology
Statistics - Ontology statistics
- OpenAI
Moderation Provider - OpenAI Moderation API integration.
- Open
AiClient - OpenAI (or compatible API) client.
- Open
AiEmbedding - OpenAI embedding provider.
- Optimization
Recommendation - Optimization recommendation.
- Optimization
Rule - PIIDetector
- PII detector using pattern matching.
- Paragraph
- Document paragraph
- Parallel
Document Processor - Parallel document processor
- Parameter
Property - Property definition for a function parameter.
- Participant
- Party
- Party information
- Pattern
Moderator - Basic pattern-based moderator.
- Penalty
- Penalty
- Performance
Cache Warmer - Performance-oriented cache warmer for preloading common queries
- Performance
Measuring Provider - Wrapper that measures performance of LLM operations.
- Performance
Metric - Performance
Metrics - Performance metrics for LLM operations.
- Performance
Timer - Performance timer for tracking operation durations.
- Perplexity
Client - Perplexity AI client for web-grounded responses.
- Precedent
Match - Legal precedent match result.
- Precedent
Match Prompter - Legal precedent matching prompter.
- Precedent
Strength - Precedent strength analysis result
- Predicate
- Symbolic predicate for logical reasoning
- Prediction
Candidate - Privilege
Protection - Privilege protection result
- Privilege
Protector - Attorney-client privilege protector
- Probabilistic
Logic Program - Probabilistic logic program
- Processing
Checkpoint - Checkpoint for incremental processing
- Prohibited
Activity - Prohibited activity definition
- Prometheus
Exporter - Prometheus metrics exporter.
- Prompt
Analysis - Analysis result for a prompt.
- Prompt
Analytics - Prompt
Chain - A complete prompt chain workflow.
- Prompt
Context - Prompt
Example - Example for prompt generation
- Prompt
Feedback - Prompt
Metrics - Metrics for prompt evaluation
- Prompt
Optimizer - Prompt optimization utilities for improving prompt quality.
- Prompt
Performance Analytics - Prompt performance analytics tracker
- Prompt
Refiner - Automatic prompt refiner based on feedback
- Prompt
Selection Statistics - Prompt
Template - A prompt template with variable substitution.
- Proof
Result - Result of theorem proving
- Proposal
- Provider
Info - Provider capability and cost information.
- Quality
Criterion - Quality criterion for prompt evaluation
- Quality
Metrics - Response quality metrics.
- Quantization
Config - Quantization configuration.
- Quantization
Metadata - Model quantization metadata.
- Quantization
Performance - Quantization performance metrics.
- Quantum
Attention - Quantum attention mechanism for legal text analysis.
- Quantum
Benchmark - Quantum advantage benchmarking system.
- Quantum
Benchmark Result - Quantum
Embedding - Quantum embedding generator for legal text.
- Quantum
Gate - Quantum
Parameters - Quantum
Similarity Search - Quantum-inspired similarity search for legal documents.
- RAGConfig
- RAG pipeline configuration.
- RAGPipeline
- RAG pipeline for retrieval-augmented generation.
- RAGStats
- Statistics about the RAG system.
- RagContext
Builder - RAG-based context builder for legal documents.
- Ranked
Clause - Rate
Limit Config - Configuration for rate limiting.
- Rate
Limiter - Rate limiter for LLM providers using a token bucket algorithm.
- ReAct
Prompt - ReAct (Reasoning + Acting) pattern builder.
- ReRanker
- Re-ranker for improving retrieval results.
- Reasoner
Stats - Reasoning
Chain - Chain-of-thought reasoning trace.
- Reasoning
Feedback - Reasoning
Pattern - A legal reasoning pattern that can be learned and improved over time.
- Reasoning
Result - Result of reasoning
- Reasoning
Trace Visualizer - Reasoning trace visualizer.
- Redline
Document - Redline document
- Redlining
Engine - Redlining engine
- Refinement
Record - Regression
Test Case - A test case for regression testing.
- Regression
Test Report - Report summarizing regression test results.
- Regression
Test Result - Result of running a regression test.
- Regression
Test Suite - Regression test suite.
- Regulation
- Regulation
- Relation
Pattern - Relationship
- Represents a relationship between two entities.
- Relationship
Extractor - Relationship extractor for legal dependencies.
- Replay
Config - Request
Batcher - Request batcher for improved throughput
- Request
Metrics - Metrics for a single LLM request.
- Researcher
Agent - Researcher agent for finding case law and precedents.
- Resource
Quota - Resource
Requirements - Resource requirements for LLM pods.
- Response
Cache - A simple LRU cache for LLM responses.
- Response
Fixture - A recorded LLM response for fixture-based testing.
- Retention
Policy - Retention
Policy Manager - Data retention policy manager
- Retrieved
Chunk - A retrieved chunk with its relevance score.
- Retry
Config - Configuration for retry behavior.
- Retry
Provider - Wraps an LLM provider with retry logic and exponential backoff.
- Reviewer
Agent - Reviewer agent for verification and quality control.
- Risk
Factor - Risk factor
- Rouge
Scores - ROUGE (Recall-Oriented Understudy for Gisting Evaluation) metrics.
- Rule
- Logical rule (Horn clause)
- Rule
Schema - Schema for a rule extracted from legal text.
- Safety
Engine - Safety rules engine.
- Safety
Rule - Safety rule for custom content validation.
- Safety
Validation - Result of safety validation.
- Scaling
Behavior - Scaling behavior configuration.
- Scenario
Outcome - Scenario outcome
- Scenario
Result - Scenario simulation result
- Scheduler
Stats - Scheduler statistics.
- Search
Result - Section
- Document section
- Secure
Credential - Self
Consistency - Self-consistency decoding implementation.
- Self
Consistency Result - Result from self-consistency decoding.
- Self
Improving Reasoner - Self-improving legal reasoning engine.
- Semantic
Cache - Semantic cache for finding similar prompts.
- Semantic
Kernel Function - Semantic Kernel-compatible function definition.
- Semantic
Kernel Parameter - Semantic Kernel parameter definition.
- Settlement
Estimate - Settlement value estimation result
- Settlement
Estimator - Settlement value estimator
- SimContract
Clause - Contract clause for simulation
- Simplification
Metrics - Simplification
Rule - Simplified
Summary - Sliding
Window Context - Sliding window context manager for long documents.
- Stakeholder
- Statute
- Statute in a specific language
- Statute
Comparator - Multilingual statute comparator
- Statute
Comparison - Multilingual statute comparison result
- Statute
Difference - Difference between statutes
- Statute
Info - Statute information for validation
- Statute
Schema - Schema for a statute structure.
- Statute
Schema Generator - Statute schema generator.
- Statute
Section - Section within a statute.
- Statute
Subsection - Subsection within a statute section.
- Statutory
Interpretation - Statutory interpretation result.
- Statutory
Interpretation Prompter - Statutory interpretation prompter.
- Stream
Chunk - Streaming text chunk from an LLM.
- Streaming
Config - Streaming
Optimizer - Streaming response optimizer
- Student
Pattern - Summary
Node - Hierarchical summary node.
- Sunset
Statute - Statute with sunset clause
- Swap
Stats - Statistics for model swapping.
- Table
Cell - Table cell data.
- Table
Data - Extracted table data.
- Tabular
Data Extractor - Tabular data extractor.
- Teacher
Pattern - Template
Builder - Builder for template variables.
- Template
Registry - A registry for managing multiple prompt templates.
- Temporal
Conflict Resolver - Temporal conflict resolver
- Temporal
Knowledge Tracker - Temporal knowledge evolution tracking.
- Temporal
Legal Rule - Time-aware legal rule
- Tenant
- Term
- Terminology
Translator - Legal terminology translator
- Theorem
Prover - Automated theorem prover for legal statutes
- Thought
Step - A single step in a chain of thought reasoning process.
- Timeout
Cancellation - Utility for creating timeout-based cancellation.
- Token
Estimator - Simple token estimator.
- Token
Stats - Statistics for token usage across multiple requests.
- Token
Tracker - Tracks token usage and provides cost estimation.
- Token
Usage - Token usage information for a single request.
- Training
Metrics - Training metrics tracker.
- Translation
- Translation with metadata
- Tree
OfThought - Tree-of-thought prompting builder.
- Uncertain
Prediction - Uncertainty
Estimate - Uncertainty estimate for a prediction.
- Uncertainty
Quantifier - Uncertainty quantifier.
- UplDetection
Result - UPL detection result.
- UplDetector
- Unauthorized practice of law (UPL) detector.
- Usage
Stats - Validating
Provider - Wraps an LLM provider with response validation and retry logic.
- Validation
Check - Individual validation check
- Validation
Config - Configuration for validating provider.
- Validation
Result - Validation result with confidence score.
- Validation
Rule - Validation rule for form fields.
- Validity
Period - Temporal validity period for a legal rule
- Valuation
Factor - Valuation factor
- VercelAI
Stream Chunk - Vercel AI SDK-compatible streaming format.
- Vercel
Function Call - Vercel AI function call data.
- Version
Aware Drafter - Version-aware drafting assistant.
- Version
Change - Version
Manager - Model version manager for tracking deployed models.
- Violation
- Violation
- Vision
Config - Vision-specific configuration.
- What
IfAnalyzer - What-if analysis engine
- What
IfResult - What-if analysis result
- Zero
Shot Classifier - Zero-shot legal classifier
- Zero
Shot Label - Zero-shot classification label
Enums§
- Accuracy
Issue Type - Type of accuracy issue
- Agent
Role - Agent role in the multi-agent system.
- Agent
Task Status - Agent task status.
- Aggregation
Strategy - Aggregation strategy for federated learning
- Anomaly
Severity - Severity level for anomalies.
- Anonymization
Strategy - Application
Type - Application type for legal rules
- Attack
Type - Type of adversarial attack
- Attribution
Method - Audience
Level - Audio
Input - Represents an audio input in various formats.
- Audit
Result - Bias
Category - Bias detection categories.
- Budget
Alert - Budget alert triggered when thresholds are exceeded.
- Case
Type - Type of legal case
- Causation
Type - Type of causation in legal analysis
- Change
Type - Chunking
Strategy - Strategy for chunking documents.
- Circuit
State - Circuit breaker states.
- Clause
Category - Clause category
- Clause
Type - Clause type
- Compression
Strategy - Strategy for compressing context.
- Concept
Type - Type of legal concept
- Condition
- Types of conditions for conditional execution.
- Condition
Type - Types of deployment conditions.
- Constraint
Type - Type of constraint
- Content
Part - Represents different types of content in a multi-modal message.
- Context
Strategy - Strategy for managing context window when it exceeds limits.
- Continual
Strategy - Continual learning strategy
- Court
Level - Court level in judicial hierarchy
- Decision
Maker - Decision maker type
- Defense
Strategy - Adversarial defense strategy
- Difference
Type - Type of statute difference
- Disclaimer
Position - Position of the disclaimer in the response.
- Disclaimer
Type - Type of disclaimer
- DocChange
Type - Document change type
- DocDifference
Type - Document difference type
- DocSeverity
- Document severity level
- Document
Type - Document type
- Event
Type - Type of causal event
- Exploration
Action - Formula
- Logical formula
- Gate
Type - Grammar
Rule Type - Type of grammar rule.
- Hallucination
Type - Type of hallucination
- Health
Status - Health check result.
- Image
Detail Level - Image detail level for vision models.
- Image
Input - Represents an image input in various formats.
- Influence
Direction - Invalidation
Strategy - Cache invalidation strategy.
- Json
Type - JSON data types for schema validation.
- Jurisdiction
- Legal jurisdiction for context-aware analysis.
- Language
- Language for cross-lingual transfer
- Language
Code - Supported legal language codes (ISO 639-1)
- Legal
Change Type - Type of legal change
- Legal
Document Type - Legal document type for specialized processing.
- Legal
Domain - Legal domain specialization types
- Legal
System Type - Type of legal system
- Load
Balancing Strategy - Load balancing strategy for distributed inference.
- Logical
Operator - Logical operator for symbolic reasoning
- Moderation
Category - Content moderation categories.
- Negotiation
Phase - Negotiation
Strategy - Negotiation strategy
- Negotiation
Style - Negotiation style.
- Operation
Type - Optimization
Category - Optimization
Strategy - Edge optimization strategy.
- PIIType
- PII (Personally Identifiable Information) type.
- Participant
Role - Party
Type - Party type
- Penalty
Type - Penalty type
- Permission
- Privacy
Mechanism - Privacy mechanism for federated learning
- Prompt
Complexity - Prompt complexity levels.
- Quantization
Format - Quantization format for model weights.
- Quantization
Precision - Quantization precision level.
- ReRanking
Algorithm - Re-ranking algorithm for retrieved chunks.
- Reading
Level - Reasoning
Method - Reasoning method used
- Recommendation
Type - Types of optimization recommendations.
- Recommended
Action - Recommended action
- Redaction
Strategy - Strategy for redacting privileged information
- Reference
Type - Reference type
- Relation
Type - Type of relationship between legal concepts
- Request
Status - Request
Type - Resolution
Preference - Dispute resolution preference.
- Resolution
Strategy - Strategy for resolving temporal conflicts
- Result
Processor - Result processing options.
- Retrieval
Strategy - Strategy for retrieving memories.
- Risk
Level - Risk level
- Role
- Role of a message in a conversation.
- Round
Outcome - Round outcome
- Routing
Strategy - Routing strategy for selecting providers.
- Rule
Status - Status of a legal rule
- Scaling
Metric - Metrics used for auto-scaling decisions.
- Scheduling
Strategy - GPU scheduling strategy.
- Severity
- Severity level
- Simplification
Category - Suggestion
Status - Suggestion
Type - Swap
Status - Model swap status.
- Swap
Strategy - Model swap strategy.
- Task
Complexity - Task complexity level for routing decisions.
- Transfer
Jurisdiction - Jurisdiction for cross-jurisdictional transfer
- Treatment
Type - How a case treats a cited precedent
- Uncertainty
Type - Types of uncertainty in model predictions.
- UplStrictness
- Strictness level for UPL detection.
- Verbosity
- Verdict
- Verdict type
- Version
Change Type - Visualization
Format - Visual representation format for reasoning traces.
- Vote
Traits§
- Cancellable
Stream Ext - Extension trait for adding cancellation support to streams.
- Conversation
Store - Conversation persistence trait.
- Conversation
Summarizer - Conversation summarizer trait.
- Document
Store - Document store abstraction for RAG.
- Embedding
Provider - Trait for embedding providers.
- Function
Hook - Function execution hooks for monitoring and control.
- LLMProvider
- LLM provider abstraction trait.
- Moderation
Provider - Content moderation provider.
Functions§
- bleu_
score - Calculates BLEU (Bilingual Evaluation Understudy) score.
- calculate_
confidence - Calculates a simple confidence score based on response quality indicators.
- calculate_
quality_ metrics - Calculates quality metrics for a text response.
- collect_
with_ cancellation - Helper to collect a stream with cancellation support.
- compare_
variants - Compares two variants using multiple metrics.
- compress_
prompt - Prompt compression helper.
- merge_
tokens - Merges multiple cancellation tokens into a single one. The returned token will be cancelled when any of the input tokens is cancelled.
- parallel_
map - Parallel map operation over prompts.
- rouge_
scores - Calculates ROUGE scores.
- with_
timeout - Wrapper for a stream that supports timeout cancellation.
Type Aliases§
- Budget
Alert Callback - Callback function for budget alerts.
- Text
Stream - Type alias for stream of text chunks.