Context Search
The Context view lets you search across all your sessions using either exact text matching or semantic (meaning-based) search. Results can be copied and injected into new coding prompts, used in RAG pipelines, or exported for analysis.Search types
Full-Text Search
Semantic Search
Full-text search
Matches exact terms againstsessions.searchableText, which concatenates the session title with all message text content. Uses Convex’s built-in search indexes for fast, ranked results.
Semantic search
Converts your query into a 1536-dimension vector using OpenAI’stext-embedding-3-small model and searches against the sessionEmbeddings table using cosine similarity.
Semantic search uses OpenAI embeddings. On self-hosted deployments, you need to set the
OPENAI_API_KEY environment variable. On the hosted version, this is already configured.How embeddings work
When a session is synced, OpenSync generates an embedding vector from the session’s searchable text. This vector is stored in thesessionEmbeddings table with:
Message-level embeddings are also generated for finer-grained search, stored in the
messageEmbeddings table.
Embeddings are generated asynchronously after session sync. There may be a brief delay before a newly synced session appears in semantic search results.
Using context search in the dashboard
1
Open the Context tab
Click Context in the sidebar navigation.
2
Choose search type
Toggle between Full-text and Semantic at the top of the search box.
3
Enter your query
Type keywords (for full-text) or a natural language question (for semantic).
4
Review results
Results show matched sessions ranked by relevance score. Each result includes a title, snippet, score, and link to the full session.
5
Copy context
Click Copy on any result to copy the relevant session content to your clipboard. Paste it into your next coding prompt for better context.
Using context search via API
Full-text
Semantic
Context endpoint (for RAG)
The dedicated/api/context endpoint returns results formatted for injection into LLM prompts:
Use cases
RAG pipelines
Inject past session knowledge into new prompts. When starting a new coding task, query the context API for relevant past sessions and include the results in your system prompt.Knowledge retrieval
Find how you solved a specific problem before. Semantic search is especially useful here because you can describe the problem in your own words.Team documentation
If your team shares an OpenSync instance (via self-hosting), search becomes a shared knowledge base of all coding sessions across the team.Eval dataset curation
Use search to find sessions about specific topics, then mark them as eval-ready for export.Tips
- Be specific with full-text search. Use function names, library names, and error messages.
- Be descriptive with semantic search. Ask questions as if you were talking to a colleague.
- Combine search types. Start with semantic to find the general area, then use full-text to find exact matches.
- Use source filters alongside search to narrow results to a specific tool.