LLM Embeddings Model
Generates an embedding for each page of the given document
Slug: llm-embeddings-model
Version: 1.0.0
Infer: Yes
Overview
LLM Embeddings Model
The LLM Embeddings model generates vector representations (embeddings) of document content at various granularity levels. These embeddings capture the semantic meaning of text, enabling powerful search, similarity matching, and AI-driven document analysis.
How It Works
- The model analyzes your document at the specified node level (page, content area, or line)
- For each node, it extracts the text content
- Optionally summarizes the content (for page-level embeddings only)
- Generates vector embeddings using the specified AI model
- Attaches the embeddings to the document structure as features
Options Configuration
Option | Description |
---|---|
model | The AI model to use for generating embeddings (default: “amazon.titan-embed-text-v1”) |
node_type | The document component level to embed (page, content-area, or line) |
use_summarization | When enabled, summarizes page content before embedding (page level only) |
summarization_prompt | Custom prompt for the AI to generate summaries (used when summarization is enabled) |
summarization_model | Language model to use for generating summaries |
Process Flow
Node Type Selection
The choice of node type significantly impacts how embeddings represent your document:
- Page: Creates embeddings for each full page, capturing overall context but less specific
- Content Area: Generates embeddings for each logical content area, balancing context and specificity
- Line: Creates embeddings for each text line, offering high granularity but less contextual information
Summarization Option
When embedding at the page level, enabling summarization offers several benefits:
- Concise Representation: Distills page content into a focused summary
- Noise Reduction: Filters out less relevant information
- Consistency: Creates more uniform-length inputs for the embedding model
- Improved Relevance: Often produces better semantic search results
The summarization process uses a separate AI model to generate a concise representation of each page before creating the embedding vectors.
Example Usage
Embeddings enable powerful document processing capabilities such as:
- Semantic Search: Find content based on meaning rather than keywords
- Document Similarity: Identify similar documents or document sections
- Clustering: Group documents by content similarity
- Recommendation: Suggest related documents based on content
- Question Answering: Support retrieving relevant content for AI question answering
Configuration Examples
For high-precision search across documents:
For document classification and clustering:
Inference Options
The following options can be configured when using this model for inference:
Name | Label | Type | Description | Default | Required |
---|---|---|---|---|---|
model | Model | cloudEmbedding | The model to use for the embeddings | amazon.titan-embed-text-v1 | No |
node_type | Node Type | string | The node type to use for the embeddings | content-area | No |
use_summarization | Use Summarization | boolean | Should we use summarization to generate the embeddings at the page level | False | No |
summarization_prompt | Summarization Prompt | string | The model to use to build a summary of each page of the document | can you summarize this text into one sentence: | No |
summarization_model | Model | cloudModel | The model to use to build a summary of each page of the document | anthropic.claude-3-5-sonnet-20240620-v1:0 | No |
Model Details
- Provider: Kodexa