Skip to main content
Ceramic is a lexical search engine built from the ground up for AI. Understanding how lexical search works and following these guidelines will help you get the most relevant results from Ceramic Search. Ceramic uses lexical (keyword-based) search, which matches documents based on the exact words and phrases in your query. Unlike semantic search systems, Ceramic does not infer meaning, intent, or synonyms—it focuses on precise term matching for speed, transparency, and control.

Key characteristics

  • Matches exact keywords and phrases
  • Fast and computationally efficient
  • Does not automatically handle synonyms or intent

Why Keyword Search Works Well with LLMs

While Ceramic uses keyword-based (lexical) search, this approach works especially well when combined with LLMs.

LLMs are good at query generation

LLMs can transform natural language into high-quality keyword queries. Instead of relying on the search system to interpret intent, you can use an LLM to:
  • Rewrite queries into precise keyword-based searches
  • Expand queries with synonyms or related terms
  • Generate multiple variations of a query

Search becomes a plentiful resource

Many search systems treat search as a scarce and expensive operation, encouraging a single, highly optimized query. Ceramic takes a different approach. With a Search API at very low cost, we found more value in creating several keyword-based searches rather than one overemphasized query. This enables new patterns:
  • Multi-query retrieval (increase recall)
  • Query variation (capture different terminology)
  • Iterative refinement (improve results over time)

Example: single query vs multi-query

Instead of one over-optimized query: impact of climate change on agriculture in developing countries You can issue multiple simpler queries: climate change agriculture impact global warming crop yields developing countries farming climate effects

Why this works

  • Lexical search provides fast, precise matching
  • LLMs provide understanding and query generation
  • Combining both gives you control + flexibility

For LLM-powered applications:
  1. Start with a user query
  2. Use an LLM to generate multiple keyword-based queries
  3. Send each query to Ceramic
  4. Aggregate and rank the results
This often produces better results than relying on a single complex query.

What Works Well

Lexical search performs best when your query includes specific, well-defined terms that are likely to appear in the target documents.

Good Query Patterns

  • Exact names
  • Technical terms
  • Product names or identifiers
  • Specific phrases
Use caseExample query
Person lookupSerena Williams Grand Slam titles
Technical documentationOAuth 2.0
Legal textCalifornia tenant security deposit return law
News/event lookup2026 Super bowl halftime performer

What Doesn’t Work Well

Because Ceramic does not perform semantic understanding, it may struggle with:

1. Synonyms

Different words with the same meaning are not automatically matched
  • BBQ ≠ barbecue
  • gym ≠ fitness center
For example, a query for gym membership cost may miss results that use fitness center pricing.

2. Vague or abstract queries

Queries without clear keywords may return weak or irrelevant results.
QueryIssue
technology trendsToo broad
how people feel about AILacks concrete terms

3. Natural language / conversational queries

Ceramic does not interpret intent like an LLM or semantic search system.
QueryIssue
What are the best ways to invest money right now?Too conversational
Why is rent so high in California?Requires reasoning, not keyword matching
Lexical search relies on exact matching, so spelling and wording matter.

How to Write Effective Queries

Specific queries return better results than broad ones. Include relevant context and details.

Be specific

Include important keywords, entities, and context
Instead ofTry
technology newsOpenAI GPT-5 announcement 2025
California lawsCalifornia tenant security deposit return laws

Include multiple relevant terms

More context = better matching
Instead ofTry
climateclimate change policy United States 2024

Use explicit synonyms when needed

If you’re unsure which term appears in documents, include multiple: college university tuition costs US

Word order matters

The order of words in your query affects results. The same words in different orders can return different results.
QueryFinds
cat houseOutdoor shelters for cats
house catDomestic cats as pets

Using Ceramic with LLMs (Query Rewriting)

If you’re using Ceramic in an AI or RAG pipeline, you should rewrite user queries into keyword-focused search queries before sending them to the API. LLMs are great at this transformation.

Example

User query (natural language): Why is rent so high in California right now? Rewritten query (Ceramic-optimized): California rent increase causes housing shortage 2025

Prompt Template

Use the following prompt to convert user input into effective Ceramic queries:
Rewrite the following user query into a concise, keyword-based search query optimized for a lexical search engine.

Guidelines:
- Use specific keywords and entities
- Avoid conversational language
- Include relevant context (location, date, topic)
- Do not include full sentences
- Output only the rewritten query

User query:
{user_query}

Example Transformations

User QueryRewritten Query
What are the effects of climate change?climate change effects global warming impact
Who performed at the Super Bowl this year?2026 Super Bowl halftime performer
How do I start investing?beginner investing strategies stocks bonds basics

Why this matters

Ceramic does not interpret intent like an LLM. Rewriting queries helps:
  • Improve keyword matching
  • Produce more consistent and predictable results

When NOT to Use Ceramic Alone

You may want to combine Ceramic with other systems if your use case requires:
  • Understanding intent or meaning
  • Handling natural language questions
  • Matching concepts rather than exact words
We’re actively exploring semantic and hybrid retrieval patterns—if this applies to your use case, reach out to our team at support.

Language support

Ceramic currently supports English web pages. Support for additional languages is coming soon.