From 0c8ca401f7bcdd1e5e0a6c3b82b63c78b5563270 Mon Sep 17 00:00:00 2001 From: Tianjing Li Date: Tue, 20 Feb 2024 16:57:00 -0500 Subject: [PATCH] Add Cohere RAG tutorial link (#6442) * Add link to Cohere RAG tutorial Signed-off-by: Tianjing Li * upgrade OS version to 2.12, english fixes Signed-off-by: Tianjing Li * Update _search-plugins/conversational-search.md Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _search-plugins/conversational-search.md Co-authored-by: Nathan Bower Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> --------- Signed-off-by: Tianjing Li Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Nathan Bower --- _search-plugins/conversational-search.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/_search-plugins/conversational-search.md b/_search-plugins/conversational-search.md index 4893e35992..be4c97b425 100644 --- a/_search-plugins/conversational-search.md +++ b/_search-plugins/conversational-search.md @@ -226,6 +226,17 @@ POST _bulk ``` {% include copy-curl.html %} +## RAG pipeline + +RAG is a technique that retrieves documents from an index, passes them through a seq2seq model, such as an LLM, and then supplements the static LLM information with the dynamically retrieved data in context. + +As of OpenSearch 2.12, the RAG technique has only been tested with OpenAI models, the Anthropic Claude model on Amazon Bedrock, and Cohere Command models. +{: .warning} + +Configuring the Cohere Command model to enable RAG requires using a post-processing function to transform the model output. For more information, see the [Cohere RAG Tutorial](https://github.com/opensearch-project/ml-commons/blob/2.x/docs/tutorials/conversational_search/conversational_search_with_Cohere_Command.md). + +### Enabling RAG + ### Step 5: Create a conversation memory You'll need to create a conversation memory that will store all messages from a conversation. To make the memory easily identifiable, provide a name for the memory in the optional `name` field, as shown in the following example. Because the `name` parameter is not updatable, this is your only opportunity to name your conversation.