More documentation needed on query request (context_config and summary)

Hi,

I was wondering what the following arguments actually do. I read the single line documentation on each one of them but still couldn’t understand :sweat_smile:


"context_config": {
      "charsBefore": 0, // <-------?
       "charsAfter": 0,, // <-------?
       "sentences_before": 2, // <-------?
       "sentences_after": 2, // <-------?
    }

 "summary": [
                {
                    "promptText": "",  // <-------?
                    "responseChars": 0 // <-------?
                }
            ]

Thank you!

Context_config is relation to the returned documents and search results from the vector DB. Chars_before and after are optional, and set the number of characters before and after the matches search term to return. Sentence_before and after is the same but instead of characters its the number of sentences.

If sentence-before and after are set chars_before and after will be ignored.

I think of these values as how much context is getting passed to the summarizer and end user in returned payload.

My understanding of promptText is this property allows you to provide your own prompt for the summarization engine, which overrides the Vectara built in prompt.

Ive never seen responseChars so cant speak for it directly but my first guess its the limit of characters the summary engine should use when generating a summary response.

@that1guy15 correctly explained context_config. We use this in the console to do show up to 2 sentences before and after the relevant result snippet. Some users prefer characters instead of sentences, so both options are allowed, though it wouldn’t make sense to use both at the same time. As @that1guy15 explained, there is a preference order of using sentences first, and if sentences before/after were not configured, it will use the characters before/after settings.

Note that any configuration of prompt text and response characters are features reserved for our Scale plan users. We try to only provide documentation on those directly to our Scale plan users so that Growth users don’t get tripped up on trying to use a feature they don’t have access to that doesn’t work for them, so if you let us know where you bumped into seeing that, I can go have a look at fixing it. If you’d like to have greater control over e.g. the prompt text and other specific summarizer options, let me know at shane@vectara.com and I can put you in touch with a technical resource on our side to get you set up with a Scale plan demo/details