Skip to content

Commit

Permalink
Update fern/pages/v2/text-generation/retrieval-augmented-generation-r…
Browse files Browse the repository at this point in the history
…ag.mdx

Co-authored-by: Meor Amer <[email protected]>
Signed-off-by: billytrend-cohere <[email protected]>
  • Loading branch information
billytrend-cohere and mrmer1 authored Sep 26, 2024
1 parent d9a0c9c commit 7b5860d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ instructions_verbose = "Write many search queries that will find helpful informa

#### Step 2: Fetching relevant documents

The next step is to [fetch documents](https://docs.cohere.com/docs/documents-and-citations) from the relevant data source using the generated search queries. For example, to answer the question about the two pop sensations _NSYNC_ and _Backstreet Boys_, one might want to use an API from a web search engine, and fetch the contents of the websites listed at the top of the search results.
The next step is to fetch documents from the relevant data source using the generated search queries. For example, to answer the question about the two pop sensations _NSYNC_ and _Backstreet Boys_, one might want to use an API from a web search engine, and fetch the contents of the websites listed at the top of the search results.

We won't go into details of fetching data in this guide, since it's very specific to the search API you're querying. However we should mention that breaking up long documents into smaller ones first (1-2 paragraphs) will help you not go over the context limit. When trying to stay within the context length limit, you might need to omit some of the documents from the request. To make sure that only the least relevant documents are omitted, we recommend using the [Rerank endpoint](https://docs.cohere.com/reference/rerank) endpoint which will sort the documents by relevancy to the query. The lowest ranked documents are the ones you should consider dropping first.

Expand Down

0 comments on commit 7b5860d

Please sign in to comment.