Skip to content

Commit

Permalink
Expand Semantic Search description
Browse files Browse the repository at this point in the history
Expand text description of Tiptap Semantic Search, add live demos and internal links.
  • Loading branch information
marco-tiptap committed Oct 3, 2024
1 parent dc99e8e commit e4164f7
Showing 1 changed file with 36 additions and 18 deletions.
54 changes: 36 additions & 18 deletions src/content/collaboration/documents/semantic-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,63 @@ meta:
import { Callout } from '@/components/ui/Callout'
import { CodeDemo } from '@/components/CodeDemo'

Have you ever asked yourself how you can search across all your stored documents and their content?
Tiptap Semantic Search brings AI-native search capabilities to your document library, making it easy to discover relationships and connections across all your documents through contextual understanding provided by large language models.

In fact this can be a quite overwhelming task to do it yourself. So let us introduce you to **Tiptap Semantic Search**.
Searching through large document archives can be challenging, especially if you miss the exact keywords. Semantic Search addresses this by interpreting the intent behind the search query and the contextual meaning within your documents.

The LLM’s interpretation is encoded as numerical representations, known as vectors or embeddings, which capture the semantic meaning of both new and existing content. These embeddings can then be easily compared to retrieve the most relevant documents.

<Callout title="Private Beta" variant="hint">
This feature is currently in private beta and is only available on invite.
This feature is currently in private beta and available by invite only. Tell us about your use case at [humans@tiptap.dev](mailto:humans@tiptap.dev) to be considered for early access to Tiptap Semantic Search.
</Callout>

In the following demo we combined a Tiptap editor instance on the left with the search results on the right.
## Live demo

Just type something in the editor and watch as the results get updated with matching pages from our documentation.
Below is an interactive demo of Tiptap Semantic Search. Type into the editor on the left, and watch as the search results update in real time with the most contextually relevant pages from our public documentation. Discover more details about the demo in our [examples](https://ai-demo.tiptap.dev/preview/Examples/SemanticSearch).

<CodeDemo src="https://ai-demo.tiptap.dev/preview/Examples/SemanticSearch?hideSource=1" />

## What is Semantic Search?
## Getting started

### Prerequisites

- Tiptap Collaboration
- Access to private beta (request an invite [here](mailto:humans@tiptap.dev))

Semantic search seeks to improve search accuracy by understanding the searcher's intent and the contextual meaning of terms as they appear in your documents.
### How it works

Unlike traditional search methods that rely on finding exact matches for query terms, semantic search understands query context, synonyms, varying word order, and natural language queries to provide more effective search results.
When you input a query, the following things happen:
1. **Embedding**: Your query is transformed into a high-dimensional vector using a model optimized for similarity search.
2. **Vector search**: This vector is compared with the existing vectors of your document library. The comparison process is based on similarity metrics to identify the most relevant documents.
3. **Context-aware results**: Documents are ranked according to their semantic similarity to the query, so that even if the words don't match, the most relevant content is surfaced.

## How to get started
We have configured these operations in the background, making the complex process transparent to you as you set up and use this new Tiptap feature. With Tiptap Semantic Search, you can:

In order to use Tiptap Semantic Search, you’ll need:
- **Improve search relevance**: Retrieve documents that match the intent of a query, not just keywords.
- **Understand context**: Recognize synonyms, related concepts, and varying word order to find the most pertinent results.
- **Enhance user experience**: Deliver more accurate and meaningful search results, improving their interaction with content.

1. Tiptap Collaboration as your document data storage
2. [An invite from us](mailto:humans@tiptap.dev?subject=Tiptap%20Semantic%20Search:%20Private%20Beta%20Request) to use this feature during private beta
This is particularly valuable for knowledge management systems, document retrieval, idea generation, or any application where precise, context-aware search results are critical.

If you want to participate in our private beta, let us know what you plan to built with Tiptap and Semenatic Search at [humans@tiptap.dev](mailto:humans@tiptap.dev?subject=Tiptap%20Semantic%20Search:%20Private%20Beta%20Request)
### Perform a search

## How to perform a search
To perform a search, use the search endpoint as described [in the REST API documentation](/collaboration/documents/rest-api#search-for-documents).

The search endpoint is [available in the REST API](/collaboration/documents/rest-api#search-for-documents).
```bash
curl -X POST https://YOUR_APP_ID.collab.tiptap.cloud/api/search \
-H "Authorization: YOUR_SECRET_FROM_SETTINGS_AREA" \
-H "Content-Type: application/json" \
-d '{"content": "Your search terms"}'
```

<Callout title="Keeping your API key secret" variant="hint">
Please make sure that you handle the requests in your own backend in order to keep your API key
secret.
</Callout>

## Retrieval-Augmented Generation (RAG)

With Tiptap Semantic Search you can easily obtain relevant content and use it as context for AI operations.
Head over to our [RAG example](/examples/advanced/retrieval-augmented-generation-rag) to learn more about this.
## Using Retrieval-Augmented Generation (RAG)

Use RAG to pull relevant information from your library and feed it into large language models, improving the quality of AI-generated content with contextually accurate data. Discover more details about the demo in our [examples](https://ai-demo.tiptap.dev/preview/Examples/RAG).

<CodeDemo src="https://ai-demo.tiptap.dev/preview/Examples/RAG?hideSource=1" />

0 comments on commit e4164f7

Please sign in to comment.