Solutions · Integrations · Amazon Bedrock

Amazon Bedrock, on the IEmbedder contract.

LM-Kit's embedding layer is an interface, not a fixed backend. The LM-Kit.NET.Integrations.Aws package implements IEmbedder on top of Amazon Bedrock, so Amazon Titan and Cohere embedding models plug into the same RAG pipeline as local models. Run local for private data, Bedrock for scale, or both, without changing the pipeline around them.

Titan Cohere IEmbedder contract

Titan and Cohere

Amazon Titan Text Embeddings and Cohere Embed. The model family is detected from the model id; Cohere requests are batched.

Drop into RAG

Pass the embedder to RagEngine with a local tokenizer. Chunking stays local; vectors come from Bedrock.

Provider-agnostic

The same IEmbedder contract local models implement. Switching providers is a constructor change, not a rewrite.

Why a provider bridge

One embedding interface, many backends.

RAG, semantic search, and clustering all consume vectors through IEmbedder. Because the contract is provider-agnostic, the model behind it is a deployment decision, not an architectural one. The Bedrock bridge is one implementation of that contract.

No lock-in

Swap Bedrock for a local model, or the reverse, by changing which IEmbedder you construct. The RAG pipeline does not change.

Hybrid local and managed

Keep sensitive corpora on a local model and route high-volume workloads to Bedrock. Both sit behind the same interface.

Same RagEngine pipeline

BedrockEmbedder plugs into RagEngine exactly like a local embedder. Import, chunking, and retrieval are unchanged.

Query-aware

For Cohere, queries and passages are embedded with the correct input_type automatically, improving retrieval recall.

Credentials via the AWS SDK

Region and credentials resolve through the standard AWS credential chain (environment, shared profile, or IAM role). The library never handles secrets.

Bring your own client

Inject a pre-configured IAmazonBedrockRuntime for full control over endpoints, retries, and testing, or use the region constructor.

In practice

Construct and use.

The region constructor uses the default AWS credential chain. Pass an explicit dimension for Titan v2 when you want one.

CreateEmbedder.cs
using Amazon;
using LMKit.Integrations.Aws.Embeddings;

// Region constructor resolves credentials from the default AWS chain.
var embedder = new BedrockEmbedder(
    modelId: "amazon.titan-embed-text-v2:0",
    region: RegionEndpoint.USEast1,
    dimensions: 1024);
Across the stack

More integrations.

Vector databases

Persist the vectors in production stores. Official connectors for Qdrant and PostgreSQL/pgvector implement the same IVectorStore the built-in path uses.

Vector database connectors

Microsoft.Extensions.AI

Any IEmbeddingGenerator from the .NET AI ecosystem can be used as an LM-Kit IEmbedder, and the reverse.

Extensions.AI bridge

Document RAG

Full-document workflows with source attribution and adaptive ingestion, on whichever embedder you choose.

Document RAG

Vector search

Cosine similarity, reranking, and hybrid retrieval over the vectors Bedrock produces.

Vector search

Demos & docs

Build it. Read it. Try it.

Working console demos on GitHub, step-by-step how-to guides on the docs site, and the API reference for the classes used on this page.

Local or managed. Same pipeline.

Get Community Edition Download