Skip to main content
Embedding and retrieval-augmented generation (RAG) let your applications search prior knowledge before asking a model to respond. Instead of relying solely on a model’s training data, RAG retrieves relevant information from your own content and provides it as context at inference time — producing more accurate, grounded, and up-to-date responses.

What Is Embedding & RAG?

Embedding converts text into numeric vectors that capture meaning. Two pieces of text with similar meaning produce similar vectors, even if the exact words differ. This makes it possible to search by concept rather than by keyword. Retrieval-augmented generation (RAG) uses those embeddings at query time. When a user asks a question, the system:
  1. Embeds the query into a vector
  2. Searches your indexed content for the most relevant chunks
  3. Passes those chunks as context to a language model
  4. The model generates a response grounded in your data
The result is answers that reference your actual content — call transcripts, documents, messages — rather than guessing from training data.

What’s in This Section

AI Search

Telnyx’s managed RAG product. Create searchable collections over your Telnyx communications data and query them with one retrieval API.

Conversation Histories API

Search persisted conversation records directly — the same indexed history that backs AI Search’s conversation sources.

Embeddings

Lower-level primitives: embed documents in a Telnyx Storage bucket and run similarity search or clustering over them yourself.

Pricing

Rates for embedding, storage, and search events.
Start with AI Search — it manages chunking, embedding, indexing, and ranking for you. Reach for the embeddings APIs when you need the primitives directly; How AI Search Works compares the two. These primitives can be used with AI Assistants, custom agent runtimes, or your own application code.