Model Configuration
ModelAlias
A combination of a model name and a required profile for that model. Model aliases are used to select specific models and their configurations in semantic operations.The name of the model (e.g.,
"gpt-4o", "claude-3-5-sonnet-20241022").The name of a profile configuration to use for the model.
Example
String Model Names
You can also specify models as strings in semantic operations:Document Parsing
ParsingEngine
Specifies the engine to use for parsing documents (especially PDFs). Type:Literal["mistral-ocr", "pdf-text", "native"]
"mistral-ocr": Use Mistral’s OCR capabilities for PDF parsing"pdf-text": Extract text directly from PDF"native": Use native parsing methods
Example
Using Model Configuration
Basic Model Selection
Model Selection Across Operations
Models can be specified for various semantic operations:Model Profiles
Profiles allow you to define reusable model configurations with specific parameters like temperature, max tokens, etc. Configure profiles in your session:Default Models
If no model is specified, Fenic uses default models for each operation:Supported Models
Fenic supports models from multiple providers:OpenAI
gpt-4ogpt-4o-minigpt-4-turbotext-embedding-3-smalltext-embedding-3-large
Anthropic
claude-3-5-sonnet-20241022claude-3-5-haiku-20241022claude-3-opus-20240229
gemini-2.0-flash-expgemini-1.5-progemini-1.5-flash
Mistral
mistral-large-latestmistral-small-latestpixtral-large-latest(with OCR support)
Make sure to set the appropriate API keys as environment variables:
OPENAI_API_KEYfor OpenAI modelsANTHROPIC_API_KEYfor Anthropic modelsGOOGLE_API_KEYfor Google modelsMISTRAL_API_KEYfor Mistral models
Best Practices
Choose Models Based on Use Case
- Fast operations: Use smaller models like
gpt-4o-miniorclaude-3-5-haiku-20241022 - Complex reasoning: Use larger models like
gpt-4oorclaude-3-5-sonnet-20241022 - Embeddings: Use specialized models like
text-embedding-3-small - Document OCR: Use
pixtral-large-latestwithmistral-ocrparsing
Use Profiles for Consistency
Define profiles to ensure consistent model behavior across your application:Consider Cost vs Performance
Balance cost and performance by choosing appropriate models:See Also
- Semantic Operations - Using semantic operations
- Data Types - Core data types
- Session Configuration - Configuring sessions and profiles
