diff --git a/docs/ai-integration/ai-agents/ai-agents_overview.mdx b/docs/ai-integration/ai-agents/ai-agents_overview.mdx index 6d66e7b51c..fa189617c1 100644 --- a/docs/ai-integration/ai-agents/ai-agents_overview.mdx +++ b/docs/ai-integration/ai-agents/ai-agents_overview.mdx @@ -26,7 +26,6 @@ import LanguageContent from "@site/src/components/LanguageContent"; * Delegating the communication with the LLM to an AI agent can significantly reduce client code complexity and development overhead. * In this article: - * [Common use cases](../../ai-integration/ai-agents/ai-agents_overview#common-use-cases) * [Defining and running AI agents](../../ai-integration/ai-agents/ai-agents_overview#defining-and-running-an-ai-agent) * [The main stages in defining an AI agent](../../ai-integration/ai-agents/ai-agents_overview#the-main-stages-in-defining-an-ai-agent) * [What is a conversation](../../ai-integration/ai-agents/ai-agents_overview#what-is-a-conversation) @@ -34,25 +33,10 @@ import LanguageContent from "@site/src/components/LanguageContent"; * [AI agent usage flowchart](../../ai-integration/ai-agents/ai-agents_overview#ai-agent-usage-flowchart) * [Streaming LLM responses](../../ai-integration/ai-agents/ai-agents_overview#streaming-llm-responses) * [Reducing throughput and expediting LLM response](../../ai-integration/ai-agents/ai-agents_overview#reducing-throughput-and-expediting-llm-response) + * [Common use cases](../../ai-integration/ai-agents/ai-agents_overview#common-use-cases) -## Common use cases - -AI agents are designed to easily integrate AI capabilities into applications and workflows. They can interact with users, intelligently retrieve and process data from proprietary databases, and apply actions based on roles they are requested to take and the data they have access to. Some of the tasks and applications they can be tailored to perform include: - - **Customer support chatbot agents** can answer customer queries based on information stored in databases and internal knowledge bases, provide troubleshooting steps, and guide users through processes in real time. - - **Data analysis and reporting agents** can analyze large datasets to extract relevant data and present it in a user-friendly format, escalate customer issues and application output, create reports and highlight points of interest, and help businesses make informed decisions. - - **Automated content generation agents** can generate summaries, add automated comments to articles and application-generated content, reference readers to related material, and create marketing content based on user input and stored information. - - **Workflow automation agents** can automate repetitive tasks such as email sorting, spam filtering, form filling, or file organization. - - **Intelligent recommendation agents** can provide personalized recommendations based on user preferences and available data, e.g. a _library assistant_ suggesting books and other resources, an _HR office assistant_ recommending rewards for employees based on their performance and available facilities near their residence, or an _e-commerce assistant_ recommending products. - -
- ## Defining and running an AI agent AI agents can be created by RavenDB clients (providing they have database administration permissions). @@ -265,3 +249,24 @@ When creating query tools - You can limit the number of times that the LLM is allowed to trigger database queries in response to a single user prompt. [Setting iterations limit using the API](../../ai-integration/ai-agents/creating-ai-agents/creating-ai-agents_api#set-maximum-number-of-iterations) + +
+ +## Common use cases + +AI agents are designed to easily integrate AI capabilities into applications and workflows. They can interact with users, intelligently retrieve and process data from proprietary databases, and apply actions based on roles they are requested to take and the data they have access to. Some of the tasks and applications they can be tailored to perform include - + +#### Customer support chatbot agents +Agents can answer customer queries based on information stored in databases and internal knowledge bases, provide troubleshooting steps, and guide users through processes in real time. + +#### Data analysis and reporting agents +Agents can analyze large datasets to extract relevant data and present it in a user-friendly format, escalate customer issues and application output, create reports and highlight points of interest, and help businesses make informed decisions. + +#### Content generation agents +Agents can generate summaries, add automated comments to articles and application-generated content, reference readers to related material, and create marketing content based on user input and stored information. + +#### Workflow automation agents +Agents can automate repetitive tasks like email sorting, spam filtering, form filling, or file organization. + +#### Intelligent recommendation agents +Agents can provide personalized recommendations based on user preferences and available data, e.g. a _library assistant_ suggesting books and other resources, an _HR office assistant_ recommending rewards for employees based on their performance and available facilities near their residence, or an _e-commerce assistant_ recommending products. \ No newline at end of file diff --git a/docs/ai-integration/ai-agents/ai-agents_start.mdx b/docs/ai-integration/ai-agents/ai-agents_start.mdx index 7878a6c229..a5bfd34959 100644 --- a/docs/ai-integration/ai-agents/ai-agents_start.mdx +++ b/docs/ai-integration/ai-agents/ai-agents_start.mdx @@ -5,54 +5,49 @@ sidebar_label: Start sidebar_position: 0 --- +import Admonition from '@theme/Admonition'; + import CardWithImage from "@site/src/components/Common/CardWithImage"; import CardWithImageHorizontal from "@site/src/components/Common/CardWithImageHorizontal"; import ColGrid from "@site/src/components/ColGrid"; -import aiAgentsStartOvImage from "./assets/ai-agents_start_ovImage.png"; -import aiAgentsStartApiImage from "./assets/ai-agents_start_apiImage.png"; -import aiAgentsStartStudioImage from "./assets/ai-agents_start_studioImage.png"; - -# AI Agents: Start - -AI agents are built to easily integrate AI capabilities into RavenDB clients. -An AI agent serves as a client's proxy to an AI model; the agent can not only maintain a continuous conversation with the model but also enable it to securely query a RavenDB database and request the client to perform actions. -Using AI agents frees developers from the need to manage an AI model in their code, enhances the model by giving it access to a credible and relevant data source, and opens the door to numerous operational scenarios. +import practicalLookAiAgentsImage from "../assets/practical-look-ai-agents-article-image.webp"; -## Use cases +import webinarThumbnailPlaceholder from "@site/static/img/webinar.webp"; -Creating an AI agent and assigning it a role can be done in minutes using Studio or the API, making it easy to address a wide variety of use cases like - +# AI Agents -- [Customer support chatbot agents](../../ai-integration/ai-agents/ai-agents_overview#customer-support-chatbot-agents) -- [Data analysis and reporting agents](../../ai-integration/ai-agents/ai-agents_overview#data-analysis-and-reporting-agents) -- [Automated content generation agents](../../ai-integration/ai-agents/ai-agents_overview#automated-content-generation-agents) -- [Workflow automation agents](../../ai-integration/ai-agents/ai-agents_overview#workflow-automation-agents) -- [Intelligent recommendation agents](../../ai-integration/ai-agents/ai-agents_overview#intelligent-recommendation-agents) +### Create conversational AI proxies for your applications. +AI agents are server-side components that act as secure proxies between RavenDB clients and AI models. They can be easily customized to handle specific client needs, tasks or workflows, such as answering questions, performing data analysis, or automating processes. + - Using AI agents frees developers from the need to manage the communication with the AI model in their code, and enables rapid integration of AI capabilities into their applications. + - An agent receives requests from clients and maintains continuous conversations with AI models to fulfill them. During the conversation, the agent can enable the model to securely query a RavenDB database (e.g., fetch recent orders or run vector searches on products) and request the client to perform actions (like sending emails or creating new orders). +- You can use AI agents to quickly create an intelligent, actionable, conversational interface for your applications, in a way that abstracts much of the complexity of AI integration. +### Use cases +Creating an AI agent and assigning it a role can be done in minutes using Studio or the API, making it easy to address a wide variety of use cases like - +* Customer support chatbot agents +* Data analysis and reporting agents +* Content generation agents +* Workflow automation agents +* Intelligent recommendation agents -## Technical documentation +### Technical documentation +Use the technical documentation to learn how to create and manage AI agents, configure secure database access, enable agents to trigger client actions, and more. -Our technical documentation explains in detail what AI agents are and how to define and use them. -If you're new to AI agents, we recommend the [overview](../../ai-integration/ai-agents/ai-agents_overview) page as a good starting point. - - - - - + + + -## Videos - -Watch our webinars to see AI agents in action and learn practical implementation techniques. - +#### Learn more: In-depth AI agents articles - - + -## In-depth articles - -Once you get acquainted with AI agents, expand your expertise with a comprehensive guide that includes some practical insights. +### Related lives & Videos +Watch our webinars to see AI agents in action and learn practical implementation techniques. - - + + + + diff --git a/docs/ai-integration/ai-integration_start.mdx b/docs/ai-integration/ai-integration_start.mdx new file mode 100644 index 0000000000..9b249152b1 --- /dev/null +++ b/docs/ai-integration/ai-integration_start.mdx @@ -0,0 +1,93 @@ +--- +title: "AI Integration" +hide_table_of_contents: true +sidebar_label: "Start" +sidebar_position: 0 +--- + +import Admonition from '@theme/Admonition'; +import CardWithImage from "@site/src/components/Common/CardWithImage"; +import CardWithImageHorizontal from "@site/src/components/Common/CardWithImageHorizontal"; +import ColGrid from "@site/src/components/ColGrid"; + +import buildVsBuyStartImage from "./assets/ai-start_ai-agents_build-vs-buy.png"; +import vectorSearchIntroImage from "./assets/ai-start_vector-search_intro.png"; +import practicalLookAiAgentsImage from "./assets/practical-look-ai-agents-article-image.webp"; + +import ayendeBlogImage from "@site/static/img/from-ayende-com.webp"; +import webinarThumbnailPlaceholder from "@site/static/img/webinar.webp"; +import discordThumbnailPlaceholder from "@site/static/img/discord.webp"; + +# AI Integration +Ship AI-powered features faster with RavenDB’s native tools. + +### Native AI features that create intelligent applications +RavenDB is equipped with a set of powerful native AI features that can +be used independently or in conjunction with each other, allowing you to easily integrate advanced AI capabilities into your applications. +These features include [AI agents](../ai-integration/ai-integration_start#ai-agents), [GenAI tasks](../ai-integration/ai-integration_start#genai-tasks), [Embeddings generation](../ai-integration/ai-integration_start#embeddings-generation), and [Vector search](../ai-integration/ai-integration_start#vector-search). + +### Use cases +RavenDB AI features help you ship any AI-related scenario quickly, including: +* **Conversational intelligence** - Natural-language chatbots, assistants, and interactive workflows. +* **Automated content enrichment** - Summarization, translation, classification, and document enhancement. +* **Semantic representation** - Creating vector representations for text, images, and other data types. +* **Similarity-based discovery** - Finding related items, aggregation, and context-aware retrieval. +* **Personalization & recommendations** - Tailoring suggestions, feeds, and user experiences. +* **Content moderation & compliance** - Automatically handling sensitive, inappropriate, or non-compliant content. +* **Knowledge management & Q&A** - Asking questions over policies, wikis, and documents; retrieving answers and citations. + +#### Learn more: In-depth AI features articles + + + + + +### AI agents +AI agents are conversational proxy components that reside on the server and autonomously handle client requests using an AI model. Instead of spending your time on integrating AI capabilities into your application, you can rapidly configure AI agents using Studio or the client API. Agents can securely read from the database and request the client for actions on behalf of the AI model, infusing intelligence into the workflow. Whether you need chatbots, automated reporting, or intelligent data processing, you get immediate production-ready AI features without the integration overhead. + + + + + + +### GenAI tasks +GenAI tasks are configurable [ongoing operations](../studio/database/tasks/ongoing-tasks/general-info) that process your documents systematically in the background using an AI model. Instead of building custom AI integration pipelines yourself, you can easily create tasks that weave AI capabilities into your data flow. They can enrich documents with AI-generated content, validate and categorize data, translate documents, or execute countless other automated workflows that leverage AI capabilities. + + + + + + +### Embeddings generation +Embeddings generation tasks transform your content into semantic vectors that enable intelligent similarity-based searches. Instead of building complex search infrastructure, you can utilize native tasks that seamlessly embed vector capabilities into your data, enabling intelligent search by meaning and context. + + + + + + +### Vector search +Vector search enables intelligent similarity-based discovery using embeddings rather than exact matching. Instead of developing custom similarity algorithms yourself, you can employ native vector operations for diverse applications. Whether you need to categorize content, find similar items, or automate recommendations, vector search delivers intelligent matching capabilities that understand meaning and context. + + + + + + +### Related lives & Videos +Watch our broadcasts to see RavenDB's AI features in action and learn practical implementation techniques. + + + + + + + +### Deep dives, content & resources +Find additional resources to enhance your knowledge and skills. + + + + + + diff --git a/docs/ai-integration/assets/ai-start_ai-agents_build-vs-buy.png b/docs/ai-integration/assets/ai-start_ai-agents_build-vs-buy.png new file mode 100644 index 0000000000..990075161e Binary files /dev/null and b/docs/ai-integration/assets/ai-start_ai-agents_build-vs-buy.png differ diff --git a/docs/ai-integration/assets/ai-start_vector-search_intro.png b/docs/ai-integration/assets/ai-start_vector-search_intro.png new file mode 100644 index 0000000000..55a9e11828 Binary files /dev/null and b/docs/ai-integration/assets/ai-start_vector-search_intro.png differ diff --git a/docs/ai-integration/assets/practical-look-ai-agents-article-image.webp b/docs/ai-integration/assets/practical-look-ai-agents-article-image.webp new file mode 100644 index 0000000000..905ca8f6f3 Binary files /dev/null and b/docs/ai-integration/assets/practical-look-ai-agents-article-image.webp differ diff --git a/docs/ai-integration/gen-ai-integration/assets/article-cover-genai.webp b/docs/ai-integration/gen-ai-integration/assets/article-cover-genai.webp new file mode 100644 index 0000000000..3711eca3d2 Binary files /dev/null and b/docs/ai-integration/gen-ai-integration/assets/article-cover-genai.webp differ diff --git a/docs/ai-integration/gen-ai-integration/assets/gen-ai_overview_metadata.png b/docs/ai-integration/gen-ai-integration/assets/gen-ai_overview_metadata.png index 8cc246ff8a..a1f485b5c0 100644 Binary files a/docs/ai-integration/gen-ai-integration/assets/gen-ai_overview_metadata.png and b/docs/ai-integration/gen-ai-integration/assets/gen-ai_overview_metadata.png differ diff --git a/docs/ai-integration/gen-ai-integration/assets/snagit/gen-ai_overview_metadata.snagx b/docs/ai-integration/gen-ai-integration/assets/snagit/gen-ai_overview_metadata.snagx new file mode 100644 index 0000000000..91ad8c67f5 Binary files /dev/null and b/docs/ai-integration/gen-ai-integration/assets/snagit/gen-ai_overview_metadata.snagx differ diff --git a/docs/ai-integration/gen-ai-integration/assets/unlock-genai-potential-article-image.webp b/docs/ai-integration/gen-ai-integration/assets/unlock-genai-potential-article-image.webp new file mode 100644 index 0000000000..7abb8a04e8 Binary files /dev/null and b/docs/ai-integration/gen-ai-integration/assets/unlock-genai-potential-article-image.webp differ diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_define-prompt-and-json-schema.png b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_define-prompt-and-json-schema.png index 6f6e0ca412..44c925f415 100644 Binary files a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_define-prompt-and-json-schema.png and b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_define-prompt-and-json-schema.png differ diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_generate-context-objects.png b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_generate-context-objects.png index 80584fdae4..07dba7cc9d 100644 Binary files a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_generate-context-objects.png and b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_generate-context-objects.png differ diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_ollama-connection-string.png b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_ollama-connection-string.png index 2a51c1afa8..9d18cccc93 100644 Binary files a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_ollama-connection-string.png and b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_ollama-connection-string.png differ diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_provide-update-script.png b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_provide-update-script.png index 738e6f9c1d..efda6e361b 100644 Binary files a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_provide-update-script.png and b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_provide-update-script.png differ diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_select-ai-task-type.png b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_select-ai-task-type.png index b5666b7a3c..4dbd80ccc5 100644 Binary files a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_select-ai-task-type.png and b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/gen-ai_select-ai-task-type.png differ diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_define-prompt-and-json-schema.snagx b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_define-prompt-and-json-schema.snagx index 35de8b9a38..8a81211ba3 100644 Binary files a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_define-prompt-and-json-schema.snagx and b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_define-prompt-and-json-schema.snagx differ diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_generate-context-objects.snagx b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_generate-context-objects.snagx index 33cff4e987..288e06443b 100644 Binary files a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_generate-context-objects.snagx and b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_generate-context-objects.snagx differ diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_ollama-connection-string.snagx b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_ollama-connection-string.snagx index fd8010b126..fbd6c6f6b4 100644 Binary files a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_ollama-connection-string.snagx and b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_ollama-connection-string.snagx differ diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_provide-update-script.snagx b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_provide-update-script.snagx index cbcb7eae23..ba6b0ab7c1 100644 Binary files a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_provide-update-script.snagx and b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_provide-update-script.snagx differ diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_select-ai-task-type.snagx b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_select-ai-task-type.snagx index d9222df78c..986b78d129 100644 Binary files a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_select-ai-task-type.snagx and b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/assets/snagit/gen-ai_select-ai-task-type.snagx differ diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_api.mdx b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_api.mdx index f93c964f48..3b1738efff 100644 --- a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_api.mdx +++ b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_api.mdx @@ -200,7 +200,13 @@ GenAiConfiguration config = new GenAiConfiguration }, // AI model Prompt - the instructions sent to the AI model - Prompt = "Check if the following blog post comment is spam or not", + Prompt = @" + Check if the following blog post comment is spam or not. + A spam comment typically includes irrelevant or promotional content, + excessive links, misleading information, or is written with the intent + to manipulate search engines or advertise products/services. + Consider the language, intent, and relevance of the comment for + the blog post content.", // Sample object - the layout for the AI model's response SampleObject = @" @@ -263,7 +269,13 @@ GenAiConfiguration config = new GenAiConfiguration }, // AI model Prompt - the instructions sent to the AI model - Prompt = "Check if the following blog post comment is spam or not", + Prompt = @" + Check if the following blog post comment is spam or not. + A spam comment typically includes irrelevant or promotional content, + excessive links, misleading information, or is written with the intent + to manipulate search engines or advertise products/services. + Consider the language, intent, and relevance of the comment for + the blog post content.", // JSON schema - a schema to format the AI model's replies by JsonSchema = @"{ @@ -335,11 +347,11 @@ var addAiIntegrationTaskResult = store.Maintenance.Send(GenAiOperation); The following example demonstrates how to define a GenAI task that removes spam comments from blog posts. -After creating a connection string to the AI model, the task defines a GenAI task that: +After creating a connection string to the AI model, the we define a GenAI task that: 1. Monitors the `Posts` collection. 2. For each document, generates a context object per each comment in the `Comments` array. 3. Sends each context object to the AI model with a prompt to check if the comment is spam. -4. Receives an AI model response per context object that classifies the comment as spam or not and specifies the reasoning for the decision. +4. Receives an AI model response per context object that determines whether the comment is spam or not and specifies the reasoning for the decision. 5. If the comment is marked as spam, the task's update script removes the comment from the `Comments` array in the document. After running the task, its functionality is demonstrated by adding to the `Posts` collection a blog post that includes a spammy comment. Adding the post triggers the task, which will scan the post's comments and remove the one that contains spam. @@ -394,7 +406,13 @@ GenAiConfiguration config = new GenAiConfiguration }, // AI model Prompt - the instructions sent to the AI model - Prompt = "Check if the following blog post comment is spam or not", + Prompt = @" + Check if the following blog post comment is spam or not. + A spam comment typically includes irrelevant or promotional content, + excessive links, misleading information, or is written with the intent + to manipulate search engines or advertise products/services. + Consider the language, intent, and relevance of the comment for + the blog post content.", // Sample object - the layout for the AI model's response SampleObject = JsonConvert.SerializeObject( @@ -451,7 +469,9 @@ using (var session = store.OpenSession()) new { Id = "comment/3", - Text = "I tried this approach with IO_Uring in the past, but I run into problems with security around the IO systems and the CISO didn't let us deploy that to production. It is more mature at this point?", + Text = "I tried this approach with IO_Uring in the past, but I run into problems " + + "with security around the IO systems and the CISO didn't let us deploy that to " + + "production. It is more mature at this point?", Author = "dave" } } diff --git a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio.mdx b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio.mdx index 122a9c16c6..20d949242a 100644 --- a/docs/ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio.mdx +++ b/docs/ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio.mdx @@ -16,7 +16,7 @@ import LanguageContent from "@site/src/components/LanguageContent"; * In this article: - * [GenAI Task](../../../ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio#genai-task) + * [The GenAI Task wizard](../../../ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio#the-genai-task-wizard) * [Add a GenAI Task](../../../ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio#add-a-genai-task) * [Configure basic settings](../../../ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio#configure-basic-settings) * [Generate context objects](../../../ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio#generate-context-objects) @@ -28,23 +28,13 @@ import LanguageContent from "@site/src/components/LanguageContent";
-## GenAI Task - -### What does a GenAI task do? -A GenAI task is an ongoing task that: - -1. Retrieves documents from a collection of your choice. -2. Shapes each retrieved document into an easy-to-handle "context object". -3. Sends context objects one by one to an AI model for processing. -4. Handles the AI model's output. - -### The GenAI Task wizard +## The GenAI Task wizard Studio's [AI Tasks](../../../ai-integration/ai-tasks-list-view) view includes a GenAI **wizard**. -Using this wizard, we can easily **create and configure** our task, as well as **test each step +Using this wizard, you can easily **create and configure** your task, as well as **test each step of its creation** in a dedicated "playground". We will go through the task creation and testing sequence below, using the wizard. -### Sample data +### Sample data: While demonstrating the creation and testing of a GenAI task, we will use the following sample document, illustrating a blog post with an array of comments, of which one is spam. We will use our GenAI task to go through the comments and identify spam entries so we can @@ -113,7 +103,7 @@ To add a new GenAI task, open: **AI Hub** > **AI Tasks** > **Add AI Task** Give your task a unique identifier. * Use only lowercase letters, numbers, and hyphens. * You can provide the identifier yourself, or click **Regenerate** to create it automatically. - * When you complete creating the task and run it, the task will add a metadata property to documents it processes, named after the identifier you define here. + * When you complete and save your task and it starts running, it will add a metadata property to documents it processes, named after the identifier you define here. The task will use this property to keep track of document parts it had already processed. See an example [here](../../../ai-integration/gen-ai-integration/gen-ai-overview#gen-ai-metadata). @@ -121,14 +111,14 @@ To add a new GenAI task, open: **AI Hub** > **AI Tasks** > **Add AI Task** Use this switch to enable or disable the task. 4. **Set responsible node** - Toggle ON to pick which cluster node will be responsible for this task. + Toggle ON to choose the cluster node that will be responsible for this task. Toggle OFF for the cluster to pick a responsible node for you. 5.
**Connection string** The Gen AI task will use an AI model to process your data. It can be a local AI model like Ollama, or an external model like OpenAI. Use this bar to Select or Create the connection string that the GenAI task - will use to connect the AI model. + will use to connect with the AI model. * You can create the connection string either here or in the dedicated [AI Connection Strings](../../../ai-integration/connection-strings/connection-strings-overview) view. * Here is an example for a connection string to a local [Ollama](../../../ai-integration/connection-strings/ollama) @@ -137,10 +127,7 @@ To add a new GenAI task, open: **AI Hub** > **AI Tasks** > **Add AI Task** ![Ollama connection string](./assets/gen-ai_ollama-connection-string.png) 6. **Steps completed** - This interactive board maps the steps needed to create a GenAI task, and marks - your current location in the task creation course. - As you advance through the wizard you'll be able to define and test your settings, - and eventually review and save your task. + You can use this interactive board as you advance through the wizard to see which steps you completed and what is still to define. Click a listed configuration option to modify its settings.
@@ -149,27 +136,26 @@ To add a new GenAI task, open: **AI Hub** > **AI Tasks** > **Add AI Task** ![Generate context objects](./assets/gen-ai_generate-context-objects.png) 1. **Source collection** - Select the collection whose documents this GenAI task will process. - E.g., the `Posts` collection. + Select the collection whose documents this GenAI task will monitor and process. + E.g., `Posts` 2.
**Context generation script** Provide a JavaScript, that your GenAI task will run over each document it retrieves from the selected collection. - * The purpose of the script you provide here is to format the documents' data in - common `Context object` that can be easily and methodically processed by the AI model. - * An example for a context generation script can be: - - - ```javascript - // go through all the comments left for this blog - for(const comment of this.Comments) - { - // Use the `ai.genContext` method to generate a context object for each comment. - ai.genContext({Text: comment.Text, Author: comment.Author, Id: comment.Id}); - } - ``` - - + The purpose of this script is to form a `Context object` that contains data extracted from the document, + that the AI model will be able to process effectively. + E.g., + + ```javascript + // Go through all the comments that were left for this blog + for(const comment of this.Comments) + { + // Use the `ai.genContext` method to generate a context object for each comment, + // that includes the comment text, author, and id. + ai.genContext({Text: comment.Text, Author: comment.Author, Id: comment.Id}); + } + ``` + 3. **Playground** Each of the steps from now on is equipped with its own playground, allowing you @@ -214,7 +200,7 @@ To add a new GenAI task, open: **AI Hub** > **AI Tasks** > **Add AI Task** on its own connection, along with the prompt and JSON schema you provide in this view. * The context provides the data for the model to process. The prompt determines what the model should do with the data. - The JSON schema formats the returned results. + The JSON schema formats the returned results, so the GenAI task can use them effectively. ![Define Prompt and JSON schema](./assets/gen-ai_define-prompt-and-json-schema.png) @@ -224,22 +210,25 @@ To add a new GenAI task, open: **AI Hub** > **AI Tasks** > **Add AI Task** ```plain - Check if the following blog post comment is spam or not. - A spam comment typically includes irrelevant or promotional content, excessive links, - misleading information, or is written with the intent to manipulate search rankings or - advertise products/services. - Consider the language, intent, and relevance of the comment to the blog post topic. - ``` + Check if the following blog post comment is spam or not. + A spam comment typically includes irrelevant or promotional content, + excessive links, misleading information, or is written with the intent to + manipulate search engines or advertise products/services. + Consider the language, intent, and relevance of the comment for + the blog post content. + ``` 2. **JSON schema** The AI model will return a results JSON object for each context object sent to it. - Here, we determine what format the AI model would give the result objects it returns. + The JSON schema we set here sets the layout for this results object. * **Use sample object** - Select this option to provide an object that the AI model will use as an example. - The results object will be formatted as the sample object you provide. + * Select this option to provide an object that the AI model will use as an example. + The results object will be formatted as the sample object you provide. + * Textual fields in the sample object can be written in natural language, + guiding the AI model what to write in the results. - E.g. if you select this option and provide this object: + E.g. if you select this option and provide this object: ```json diff --git a/docs/ai-integration/gen-ai-integration/gen-ai-overview.mdx b/docs/ai-integration/gen-ai-integration/gen-ai-overview.mdx index 05395cc7b6..4df728057a 100644 --- a/docs/ai-integration/gen-ai-integration/gen-ai-overview.mdx +++ b/docs/ai-integration/gen-ai-integration/gen-ai-overview.mdx @@ -15,20 +15,16 @@ import LanguageContent from "@site/src/components/LanguageContent"; # GenAI Integration: Overview -* **GenAI Integration** allows RavenDB to connect and interact with Generative AI models, - introducing numerous new ways for intelligent, autonomous data processing in production. - - A task can be built in minutes, e.g. to Classify customer inquiries based on sentiment, Generate automated responses to frequently asked questions, Escalate support tickets, Summarize lengthy documents, Provide relevant recommendations, Tag and prioritize content for efficient retrieval, Enhance data security by detecting anomalies, Optimize inventory predictions... or endless other options, bound only by our creativity. +* **Ongoing GenAI tasks** allow RavenDB to connect and interact with Generative AI models, introducing intelligent, autonomous data processing in production. + +* Tasks can be easily defined, tested and deployed using [the client API](../../ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_api) or [Studio](../../ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio). -* **Ongoing GenAI tasks** can be easily defined, tested and deployed using API or Studio. + While creating a GenAI task via Studio, a smart interactive **test environment** is provided, allowing each phase of the task to be tested in a secluded playground, freely and without changing your data, while at the same time producing a result set that can be tried out by the next phase. - While creating a GenAI task via Studio, a smart interactive environment is provided, - allowing each phase of the task to be tested in a secluded playground, freely and without - harming your data, but also produce result sets that can be tried out by the next phase. +* A task can be built in minutes, e.g. to generate automated responses to frequently asked questions, escalate support tickets, summarize lengthy documents, enhance data security by detecting anomalies, or numerous other applications. + See a few additional examples in the [common use cases](../../ai-integration/gen-ai-integration/gen-ai-overview#common-use-cases) section below. -* **You can use local and remote AI models**, e.g. a local `Ollama llama3.2` service during - a development phase that requires speed and no additional costs, and a remote `OpenAI gpt-4o-mini` - when you need a live service with advanced capabilities. +* You can use local and remote AI models, e.g. a local `Ollama llama3.2` service during a development phase that requires speed and no additional costs, and a remote `OpenAI gpt-4o-mini` when you need a live service with advanced capabilities. * In this article: * [RavenDB GenAI tasks](../../ai-integration/gen-ai-integration/gen-ai-overview#ravendb-genai-tasks) @@ -151,11 +147,12 @@ These are the elements that need to be defined for a GenAI task. ```plain - Check if the following blog post comment is spam or not. - m comment typically includes irrelevant or promotional content, excessive - , misleading information, or is written with the intent to manipulate search - ngs or advertise products/services. - der the language, intent, and relevance of the comment to the blog post topic. + Check if the following blog post comment is spam or not. + A spam comment typically includes irrelevant or promotional content, + excessive links, misleading information, or is written with the intent to + manipulate search engines or advertise products/services. + Consider the language, intent, and relevance of the comment for + the blog post content. ``` @@ -164,8 +161,7 @@ These are the elements that need to be defined for a GenAI task. * The update script can take any action, based on the information included in the model's response. It can, for example, Modify the source document, Create new documents populated by AI-generated text, Remove existing documents, and so on. - The following script, for example, removes a comment from a blog post if the AI has concluded - that the comment is spam. + E.g., the following script removes a comment from a blog post if the AI model has concluded that the comment is spam. ```javascript @@ -186,7 +182,7 @@ These are the elements that need to be defined for a GenAI task. to create GenAI tasks. The wizard will guide you through the task creation phases, exemplify where needed, and provide you with convenient, interactive, secluded "playgrounds" for free interactive experimenting. -* You can also create GenAI tasks using the [Client API](../../ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_api) +* Or, you can create GenAI tasks using the [Client API](../../ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_api).
@@ -209,19 +205,21 @@ added or modified. * The update script
* If the task is requested to process this document part again, it will compute a new hash code based on these elements, and compare it with the existing hash, logged in the document metadata. - * If the new hash differs from the existing one, it will indicate that the content or the configuration has changed, and the task will reprocess this document part. + * If the new hash differs from the existing one, it will indicate that the content and/or the configuration changed, and the task will reprocess this document part. * If the new hash is identical to the existing one, the task will conclude that the context object was already processed with the exact same content and task configuration, and skip reprocessing it. - ![Tracking processed document parts](./assets/gen-ai_overview_hash-flow.png) + **Tracking processed document parts**: + ![Tracking processed document parts](./assets/gen-ai_overview_hash-flow.png) -
![Metadata Identifier and Hash codes](./assets/gen-ai_overview_metadata.png) + **Hash codes in document metadata**: + ![Metadata Identifier and Hash codes](./assets/gen-ai_overview_metadata.png) - 1. **Identifier** - This is the user-defined task identifier (defined as part of the configuration). - 2. **Hash codes** - These hash codes were created after processing the document. - The codes were computed per comment, based on the comment's content and the current task configuration. - When the document is processed again, the task will generate a new hash code for each comment. If the comment or the task configuration has changed, the new hash will differ from the existing one and trigger reprocessing. If none of them changed, the identical hash will indicate that no reprocessing is needed. + 1. **Identifier** + This is the user-defined task identifier (defined as part of the configuration). + 2. **Hash codes** + These hash codes were created after processing the document. + The codes were computed per comment, based on the comment's content and the current task configuration. + When the document is processed again, the task will generate a new hash code for each comment. If the comment or the task configuration has changed, the new hash will differ from the existing one and trigger reprocessing. If none of them changed, the identical hash will indicate that no reprocessing is needed.
diff --git a/docs/ai-integration/gen-ai-integration/gen-ai_start.mdx b/docs/ai-integration/gen-ai-integration/gen-ai_start.mdx index 69f62148f5..1c0e070e19 100644 --- a/docs/ai-integration/gen-ai-integration/gen-ai_start.mdx +++ b/docs/ai-integration/gen-ai-integration/gen-ai_start.mdx @@ -1,63 +1,60 @@ --- -title: "GenAI: Start" +title: "GenAI tasks: Start" hide_table_of_contents: true sidebar_label: Start sidebar_position: 0 --- +import Admonition from '@theme/Admonition'; + import CardWithImage from "@site/src/components/Common/CardWithImage"; import CardWithImageHorizontal from "@site/src/components/Common/CardWithImageHorizontal"; import ColGrid from "@site/src/components/ColGrid"; import genAiStartOvImage from "./assets/gen-ai_start_ov-image.png"; import genAiStartApiImage from "./assets/gen-ai_start_api-image.png"; import genAiStartStudioImage from "./assets/gen-ai_start_studio-image.png"; +import unlockGenAiPotentialArticleImage from "./assets/unlock-genai-potential-article-image.webp"; +import articleGenAiImage from "./assets/article-cover-genai.webp"; + +import ayendeBlogImage from "@site/static/img/from-ayende-com.webp"; +import webinarThumbnailPlaceholder from "@site/static/img/webinar.webp"; + +# GenAI tasks + +### Build intelligent workflows with GenAI tasks. +GenAI tasks are [ongoing operations](../../studio/database/tasks/ongoing-tasks/general-info) that continuously monitor specified collections and process documents as they are added or modified. +- Similar to [ETL tasks](../../studio/database/tasks/ongoing-tasks/ravendb-etl-task), a GenAI task extracts content from documents. But instead of sending the content to another database, the task sends it to an AI model (like OpenAI) along with a guiding **prompt** and a **JSON schema** that defines the layout for the model's response. +- When the LLM responds, the GenAI task can use its response to, for example, update the source document with LLM-generated content, or create new documents in the database. +- GenAI tasks can infuse intelligence into a wide variety of content handling scenarios. + E.g., they can enrich documents with AI-generated summaries or classifications, translate text into different languages, or generate new content based on existing data. +- You can easily create GenAI tasks using Studio or the client API. + When created via Studio, each step of their creation can be easily tested and validated before deployment. + +### Use cases +GenAI tasks can infuse intelligence into a wide variety of content handling scenarios. Here are some of the categories in which they can help. +* Data enrichment & enhancement +* Smart automation & workflows +* Enhanced search & discovery +* Business intelligence & insights +* Content analysis & moderation + +### Technical documentation +Learn how to create and manage tasks that intelligently process your data and transform your content. -# GenAI: Start - -RavenDB Generative AI (GenAI) tasks are [ongoing operations](../../studio/database/tasks/ongoing-tasks/general-info) that continuously monitor a specified collection, processing documents as they are added or modified. Similar to ETL tasks, a GenAI task extracts content from each processed document and transfers this content. However, instead of sending it to a final destination like an ETL task would, it sends the content to an AI model along with a guiding **prompt** and a **response template**. -When the model responds, it structures its response according to the response template so the GenAI task will be able to use it effectively, e.g., to update the source document with the requested information or with LLM-generated insights. -GenAI tasks can be easily created using Studio or the client API, and when created via Studio, each step of their creation can be easily tested and validated before deployment. - -## Use cases - -GenAI tasks can infuse intelligence into a wide variety of content handling scenarios, here are just a few of the categories in which they can help (click a category for a few examples in this area): - -- [Data enrichment & enhancement use cases](../../ai-integration/gen-ai-integration/gen-ai-overview#data-enrichment--enhancement-use-cases) - -- [Smart automation & workflows use cases](../../ai-integration/gen-ai-integration/gen-ai-overview#smart-automation--workflows-use-cases) - -- [Enhanced search & discovery use cases](../../ai-integration/gen-ai-integration/gen-ai-overview#enhanced-search--discovery-use-cases) - -- [Business intelligence & insights use cases](../../ai-integration/gen-ai-integration/gen-ai-overview#business-intelligence--insights-use-cases) - -- [Content analysis & moderation use cases](../../ai-integration/gen-ai-integration/gen-ai-overview#content-analysis--moderation-use-cases) - - -## Technical documentation - -Use our technical documentation to learn more about GenAI tasks and how to create and manage them. -If you're new to GenAI tasks, the [overview](../../ai-integration/gen-ai-integration/gen-ai-overview) page as a good starting point. + + + + +#### Learn more: In-depth GenAI tasks articles - - - + + + -## Videos - +### Related lives & Videos Learn how GenAI tasks help create reliable and effective AI-powered workflows. - - - - - -## In-depth articles - -Once you're familiar with the basics of GenAI tasks, you can take a look at these in-depth articles. - - - - - + + diff --git a/docs/ai-integration/gen-ai-integration/modify-gen-ai-task/modify-gen-ai-task_api.mdx b/docs/ai-integration/gen-ai-integration/modify-gen-ai-task/modify-gen-ai-task_api.mdx index f7261e1fe3..100c502950 100644 --- a/docs/ai-integration/gen-ai-integration/modify-gen-ai-task/modify-gen-ai-task_api.mdx +++ b/docs/ai-integration/gen-ai-integration/modify-gen-ai-task/modify-gen-ai-task_api.mdx @@ -17,7 +17,7 @@ import LanguageContent from "@site/src/components/LanguageContent"; * To modify an existing GenAI task, register a modified task configuration object with the server using the existing `TaskID`, via the `UpdateGenAiOperation` store operation. -* Note that this `TaskID` is **not** the [user-defined task identifier](../../../ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio#configure-basic-settings) that we define as part of the task configuration, but an internal identifier that RavenDB uses to manage its tasks (e.g. ETL tasks, backup tasks, and others). +* Note that this `TaskID` is **not** the [user-defined task identifier](../../../ai-integration/gen-ai-integration/create-gen-ai-task/create-gen-ai-task_studio#configure-basic-settings) that we define as part of the task configuration, but an identifier that RavenDB uses internally to manage the task (same as it does with other ongoing tasks like ETL tasks, backup tasks, and others). * The **user-defined task identifier** is a `string` variable that is mainly used as a property name for a list of hashes that identify [processed document parts](../../../ai-integration/gen-ai-integration/gen-ai-overview#tracking-of-processed-document-parts) in the document metadata. * The `TaskID` is a `long` variable that is used by RavenDB to identify and manage the task. See the examples below to learn how to extract the `TaskID` and use it to register the modified task configuration. diff --git a/docs/ai-integration/generating-embeddings/assets/ai-search-article-cover.webp b/docs/ai-integration/generating-embeddings/assets/ai-search-article-cover.webp new file mode 100644 index 0000000000..9696394161 Binary files /dev/null and b/docs/ai-integration/generating-embeddings/assets/ai-search-article-cover.webp differ diff --git a/docs/ai-integration/generating-embeddings/assets/embeddings-generation_start_api-image.png b/docs/ai-integration/generating-embeddings/assets/embeddings-generation_start_api-image.png new file mode 100644 index 0000000000..a43afaf78d Binary files /dev/null and b/docs/ai-integration/generating-embeddings/assets/embeddings-generation_start_api-image.png differ diff --git a/docs/ai-integration/generating-embeddings/assets/embeddings-generation_start_ov-image.png b/docs/ai-integration/generating-embeddings/assets/embeddings-generation_start_ov-image.png new file mode 100644 index 0000000000..b90ffb74a8 Binary files /dev/null and b/docs/ai-integration/generating-embeddings/assets/embeddings-generation_start_ov-image.png differ diff --git a/docs/ai-integration/generating-embeddings/assets/embeddings-generation_start_studio-image.png b/docs/ai-integration/generating-embeddings/assets/embeddings-generation_start_studio-image.png new file mode 100644 index 0000000000..19a72d98dc Binary files /dev/null and b/docs/ai-integration/generating-embeddings/assets/embeddings-generation_start_studio-image.png differ diff --git a/docs/ai-integration/generating-embeddings/embedding-collections.mdx b/docs/ai-integration/generating-embeddings/embedding-collections.mdx index 4973e1592d..cb25679e5a 100644 --- a/docs/ai-integration/generating-embeddings/embedding-collections.mdx +++ b/docs/ai-integration/generating-embeddings/embedding-collections.mdx @@ -2,7 +2,7 @@ title: "The Embedding Collections" hide_table_of_contents: true sidebar_label: The Embedding Collections -sidebar_position: 2 +sidebar_position: 3 --- import Admonition from '@theme/Admonition'; diff --git a/docs/ai-integration/generating-embeddings/embeddings-generation-task.mdx b/docs/ai-integration/generating-embeddings/embeddings-generation-task.mdx index 94e49e1721..6c8d44a7d4 100644 --- a/docs/ai-integration/generating-embeddings/embeddings-generation-task.mdx +++ b/docs/ai-integration/generating-embeddings/embeddings-generation-task.mdx @@ -2,7 +2,7 @@ title: "The Embeddings Generation Task" hide_table_of_contents: true sidebar_label: The Embeddings Generation Task -sidebar_position: 1 +sidebar_position: 2 --- import LanguageSwitcher from "@site/src/components/LanguageSwitcher"; diff --git a/docs/ai-integration/generating-embeddings/embeddings-generation_start.mdx b/docs/ai-integration/generating-embeddings/embeddings-generation_start.mdx new file mode 100644 index 0000000000..43462027a4 --- /dev/null +++ b/docs/ai-integration/generating-embeddings/embeddings-generation_start.mdx @@ -0,0 +1,60 @@ +--- +title: "Generating embeddings: Start" +hide_table_of_contents: true +sidebar_label: Start +sidebar_position: 0 +--- + +import Admonition from '@theme/Admonition'; + +import CardWithImage from "@site/src/components/Common/CardWithImage"; +import CardWithImageHorizontal from "@site/src/components/Common/CardWithImageHorizontal"; +import ColGrid from "@site/src/components/ColGrid"; +import embedGenStartApiImage from "./assets/embeddings-generation_start_api-image.png"; +import embedGenStartStudioImage from "./assets/embeddings-generation_start_studio-image.png"; +import aiSearchArticleImage from "./assets/ai-search-article-cover.webp"; + +import ayendeBlogImage from "@site/static/img/from-ayende-com.webp"; +import webinarThumbnailPlaceholder from "@site/static/img/webinar.webp"; +import discordLargeThumbnailPlaceholder from "@site/static/img/discord-lg.webp"; + +# Generating embeddings + +### Create embeddings to enable AI-powered similarity search. +[Embeddings](https://en.wikipedia.org/wiki/Embedding_(machine_learning)) are numeric vectors that you can create for data (like a text or an image) to capture meanings, contexts, or relationships related to the data. You can then search the data by running intelligent queries over its embeddings using [vector search](../../ai-integration/vector-search/vector-search_start) to find content by similarity rather than exact match. +- RavenDB allows you to create embeddings using native [ongoing embeddings-generation tasks](../../ai-integration/generating-embeddings/embeddings-generation-task) that systematically process document collections and convert document fields (like texts or arrays) into embeddings. To create the embeddings, the tasks can use either an external AI model (such as OpenAI) or RavenDB's default embedding model. +- You can also create embeddings using external embeddings providers and store them in your database (e.g., to handle other content types such as images). +- You can avoid pre-generating embeddings, and let vector search operations generate embeddings on-the-fly, while searching. +- Embeddings can be used by other RavenDB AI features. E.g., [AI agents](../../ai-integration/ai-agents/ai-agents_start) can use vector search to retrieve relevant data requested by the LLM. + +### Use cases +Embeddings generation tasks can be used to prepare your data for AI-powered search, analysis, and usage, e.g., for - +* **Enterprise knowledge bases** + Generate embeddings for thousands of documents, policies, and procedures to enable instant semantic search +* **Legal document libraries** + Process case law, contracts, and regulations to build searchable legal repositories +* **Product catalogs** + Convert product descriptions, specifications, and reviews into embeddings for enhanced e-commerce search +* **Content management systems** + Transform blog posts, articles, and marketing materials into searchable vector representations + +### Technical documentation +Learn about generating, storing, and using embeddings in RavenDB. + + + + + + +#### Learn more: In-depth embeddings generation articles + + + + + +### Related lives & Videos +Learn more about enhancing your applications using vector search operations. + + + + \ No newline at end of file diff --git a/docs/ai-integration/generating-embeddings/overview.mdx b/docs/ai-integration/generating-embeddings/overview.mdx index aec664e5a6..5dd8ef569f 100644 --- a/docs/ai-integration/generating-embeddings/overview.mdx +++ b/docs/ai-integration/generating-embeddings/overview.mdx @@ -2,7 +2,7 @@ title: "Generating Embeddings - Overview" hide_table_of_contents: true sidebar_label: "Overview" -sidebar_position: 0 +sidebar_position: 1 --- import LanguageSwitcher from "@site/src/components/LanguageSwitcher"; diff --git a/docs/ai-integration/vector-search/assets/ai-image-search-with-ravendb.webp b/docs/ai-integration/vector-search/assets/ai-image-search-with-ravendb.webp new file mode 100644 index 0000000000..f4ed44169a Binary files /dev/null and b/docs/ai-integration/vector-search/assets/ai-image-search-with-ravendb.webp differ diff --git a/docs/ai-integration/vector-search/data-types-for-vector-search.mdx b/docs/ai-integration/vector-search/data-types-for-vector-search.mdx index 8067350b77..06caaac31b 100644 --- a/docs/ai-integration/vector-search/data-types-for-vector-search.mdx +++ b/docs/ai-integration/vector-search/data-types-for-vector-search.mdx @@ -2,7 +2,7 @@ title: "Data Types for Vector Search" hide_table_of_contents: true sidebar_label: Data Types for Vector Search -sidebar_position: 4 +sidebar_position: 5 --- import LanguageSwitcher from "@site/src/components/LanguageSwitcher"; diff --git a/docs/ai-integration/vector-search/indexing-attachments-for-vector-search.mdx b/docs/ai-integration/vector-search/indexing-attachments-for-vector-search.mdx index 2fa3f47b80..0cf688186a 100644 --- a/docs/ai-integration/vector-search/indexing-attachments-for-vector-search.mdx +++ b/docs/ai-integration/vector-search/indexing-attachments-for-vector-search.mdx @@ -2,7 +2,7 @@ title: "Indexing Attachments for Vector Search" hide_table_of_contents: true sidebar_label: Indexing Attachments for Vector Search -sidebar_position: 3 +sidebar_position: 4 --- import LanguageSwitcher from "@site/src/components/LanguageSwitcher"; diff --git a/docs/ai-integration/vector-search/ravendb-as-vector-database.mdx b/docs/ai-integration/vector-search/ravendb-as-vector-database.mdx index 6db7c5f7e8..eb73ac1b65 100644 --- a/docs/ai-integration/vector-search/ravendb-as-vector-database.mdx +++ b/docs/ai-integration/vector-search/ravendb-as-vector-database.mdx @@ -2,7 +2,7 @@ title: "RavenDB as a Vector Database" hide_table_of_contents: true sidebar_label: RavenDB as a Vector Database -sidebar_position: 0 +sidebar_position: 1 --- import Admonition from '@theme/Admonition'; diff --git a/docs/ai-integration/vector-search/vector-search-using-dynamic-query.mdx b/docs/ai-integration/vector-search/vector-search-using-dynamic-query.mdx index 4a55a14537..9df1df682d 100644 --- a/docs/ai-integration/vector-search/vector-search-using-dynamic-query.mdx +++ b/docs/ai-integration/vector-search/vector-search-using-dynamic-query.mdx @@ -2,7 +2,7 @@ title: "Vector Search using a Dynamic Query" hide_table_of_contents: true sidebar_label: Vector Search using a Dynamic Query -sidebar_position: 1 +sidebar_position: 2 --- import LanguageSwitcher from "@site/src/components/LanguageSwitcher"; diff --git a/docs/ai-integration/vector-search/vector-search-using-static-index.mdx b/docs/ai-integration/vector-search/vector-search-using-static-index.mdx index fe4190c888..f288454d1a 100644 --- a/docs/ai-integration/vector-search/vector-search-using-static-index.mdx +++ b/docs/ai-integration/vector-search/vector-search-using-static-index.mdx @@ -2,7 +2,7 @@ title: "Vector Search using a Static Index" hide_table_of_contents: true sidebar_label: Vector Search using a Static Index -sidebar_position: 2 +sidebar_position: 3 --- import LanguageSwitcher from "@site/src/components/LanguageSwitcher"; diff --git a/docs/ai-integration/vector-search/vector-search_start.mdx b/docs/ai-integration/vector-search/vector-search_start.mdx new file mode 100644 index 0000000000..c4a6ae42ac --- /dev/null +++ b/docs/ai-integration/vector-search/vector-search_start.mdx @@ -0,0 +1,61 @@ +--- +title: "Vector search: Start" +hide_table_of_contents: true +sidebar_label: Start +sidebar_position: 0 +--- + +import Admonition from '@theme/Admonition'; + +import CardWithImage from "@site/src/components/Common/CardWithImage"; +import CardWithImageHorizontal from "@site/src/components/Common/CardWithImageHorizontal"; +import ColGrid from "@site/src/components/ColGrid"; +import aiImageSearchWithRavenDbImage from "./assets/ai-image-search-with-ravendb.webp"; + +import ayendeBlogImage from "@site/static/img/from-ayende-com.webp"; +import webinarThumbnailPlaceholder from "@site/static/img/webinar.webp"; + +# Vector search + +### Search by meaning and context using vector search operations. +Vector search operations allow you to compare [Embeddings](https://en.wikipedia.org/wiki/Embedding_(machine_learning)) to find content by similarity rather than by exact matches. E.g., to find text by meaning or image by context. +- You can search over embeddings that were generated by RavenDB [ongoing embeddings-generation tasks](../../ai-integration/generating-embeddings/embeddings-generation-task) or by an external embeddings provider. +- You can also generate the embeddings for your documents on-the-fly, while searching. +- When you run a vector search, your search query is converted into an embedding as well, and compared against document embeddings using either a dynamic query for ad-hoc or infrequent searches, or a static index for optimized performance. +- Vector search can be used by other RavenDB AI features. E.g., [AI agents](../../ai-integration/ai-agents/ai-agents_start) can use vector search to retrieve relevant data requested by the LLM. + +### Use cases +Vector search can help wherever you need to find similar items based on proximity rather than exact matches, e.g. - +* **Knowledge and document search** + Find relevant documentation, policies, legal texts, or enterprise reports using natural language queries. +* **Product and content recommendations** + Suggest similar products, articles, videos, or media based on descriptive queries and user preferences. +* **Customer support automation** + Route questions to the best help articles, retrieve guides, and power chatbot responses with relevant information. +* **Business intelligence and analysis** + Profile customers and uncover market trends by comparing behavioral and relationship-based similarities. +* **Media and content analysis** + Discover similar images, moderate content, and monitor social media for brand mentions and sentiment. + +### Technical documentation +Learn about vector search operations, how they use embeddings to find content by meaning or context, their ability to generate embeddings on the fly during searches, and other key aspects of this feature. + + + + + + +#### Learn more: In-depth vector search articles + + + + + + +### Related lives & Videos +Learn more about enhancing your applications using vector search operations. + + + + + diff --git a/docs/ai-integration/vector-search/what-affects-vector-search-results.mdx b/docs/ai-integration/vector-search/what-affects-vector-search-results.mdx index dd59302735..d8e8c4add4 100644 --- a/docs/ai-integration/vector-search/what-affects-vector-search-results.mdx +++ b/docs/ai-integration/vector-search/what-affects-vector-search-results.mdx @@ -2,7 +2,7 @@ title: "What Affects Vector Search Results" hide_table_of_contents: true sidebar_label: What Affects Vector Search Results -sidebar_position: 5 +sidebar_position: 6 --- import Admonition from '@theme/Admonition'; diff --git a/src/components/Homepage/Features/FeaturesLists/AiFeatures.tsx b/src/components/Homepage/Features/FeaturesLists/AiFeatures.tsx index 96f70ddd94..1ea6ceabb1 100644 --- a/src/components/Homepage/Features/FeaturesLists/AiFeatures.tsx +++ b/src/components/Homepage/Features/FeaturesLists/AiFeatures.tsx @@ -14,9 +14,9 @@ export default function AiFeaturesGrid() { const aiFeatures: Feature[] = [ { - title: "AI Agents", + title: "AI agents", icon: "ai-agents", - url: `/${activeVersion.label}/ai-integration/ai-agents/ai-agents-api`, + url: `/${activeVersion.label}/ai-integration/ai-agents/ai-agents_start`, description: "Database-native agents that query & act safely", minimumSupportedVersion: "7.1" }, @@ -28,7 +28,7 @@ export default function AiFeaturesGrid() { minimumSupportedVersion: "7.0" }, { - title: "GenAI", + title: "GenAI tasks", icon: "genai", url: `/${activeVersion.label}/ai-integration/gen-ai-integration/gen-ai-overview`, description: "Empower your application using intelligent task", diff --git a/static/icons/bulb.svg b/static/icons/bulb.svg new file mode 100644 index 0000000000..d6a1fa2834 --- /dev/null +++ b/static/icons/bulb.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/static/icons/console.svg b/static/icons/console.svg new file mode 100644 index 0000000000..caf026d814 --- /dev/null +++ b/static/icons/console.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/static/icons/dashboard.svg b/static/icons/dashboard.svg new file mode 100644 index 0000000000..34b63e91d3 --- /dev/null +++ b/static/icons/dashboard.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/icons/embeddings.svg b/static/icons/embeddings.svg new file mode 100644 index 0000000000..368f28db09 --- /dev/null +++ b/static/icons/embeddings.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/icons/query.svg b/static/icons/query.svg new file mode 100644 index 0000000000..a965855672 --- /dev/null +++ b/static/icons/query.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/icons/studio-config.svg b/static/icons/studio-config.svg index ad7d5a54c2..0f144e0636 100644 --- a/static/icons/studio-config.svg +++ b/static/icons/studio-config.svg @@ -1,7 +1,3 @@ - - - - - - + + diff --git a/static/img/discord-lg.webp b/static/img/discord-lg.webp new file mode 100644 index 0000000000..411796ffdd Binary files /dev/null and b/static/img/discord-lg.webp differ diff --git a/static/img/discord.webp b/static/img/discord.webp new file mode 100644 index 0000000000..124893048a Binary files /dev/null and b/static/img/discord.webp differ diff --git a/static/img/from-ayende-com.webp b/static/img/from-ayende-com.webp new file mode 100644 index 0000000000..dc2b0b44df Binary files /dev/null and b/static/img/from-ayende-com.webp differ diff --git a/static/img/webinar.webp b/static/img/webinar.webp new file mode 100644 index 0000000000..13bc970a81 Binary files /dev/null and b/static/img/webinar.webp differ