Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
changed a commnet
Browse files Browse the repository at this point in the history
  • Loading branch information
acatav committed Nov 1, 2023
1 parent 6396480 commit 981c298
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/canopy-lib-quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,9 @@
"source": [
"## Query the Context Engine\n",
"\n",
"`ContextEngine` is an object that responsible to retrieve the most relevant context for a given query and token budget. \n",
"`ContextEngine` is an object responsible for retrieving the most relevant context for a given query and token budget. \n",
"\n",
"While `KnowledgeBase` retrieves the full `top-k` structured documents for each query including all the metadata related to them, the context engine in charge of transforming this information to a \"prompt ready\" context that can later feeded to an LLM. To achieve this the context engine holds a `ContextBuilder` object that takes query results from the knowledge base and returns a `Context` object. The context builder also considers the `max_context_tokens` budget given to it and builds the most relevant context that not exceeds the token budget."
"While `KnowledgeBase` retrieves the full `top-k` structured documents for each query including all the metadata related to them, the context engine in charge of transforming this information to a \"prompt ready\" context that can later feeded to an LLM. To achieve this the context engine holds a `ContextBuilder` object that takes query results from the knowledge base and returns a `Context` object. The `ContextEngine`'s default behavior is to use a `StuffingContextBuilder`, which simply stacks retrieved document chunks in a JSON-like manner, hard limiting by the number of chunks that fit the `max_context_tokens` budget. More complex behaviors can be achieved by providing a custom `ContextBuilder` class."
]
},
{
Expand Down

0 comments on commit 981c298

Please sign in to comment.