Source

Does Submitting Long Context Solve All LLM Contextual Reference Challenges?

Large Language Models (LLMs) are known to hallucinate. Hallucination is when a LLM generates a highly succinct and highly plausible answer; but factually incorrect. Hallucination can be negated by injecting prompts with contextually relevant data which the LLM can reference.

Cobus Greyling
4 min readSep 6, 2023

--

I’m currently the Chief Evangelist @ HumanFirst. I explore & write about all things at the intersection of AI & language; ranging from LLMs, Chatbots, Voicebots, Development Frameworks, Data-Centric latent spaces & more.

Growing LLM context size has the allure that large swaths of contextual reference data can merely be submitted to the LLM to act as reference data.

Reference data which will create a contextual reference for the LLM and in turn negate hallucination…

Below is a view of the Vercel playground, for each of the LLMs available the context window is shown.

Vercel Playground

A recent study examined the performance of LLMs on two tasks:

  • One involving the identification of relevant information within input contexts.
  • A second involving multi-document question answering and key-value retrieval.

The study found that LLMs perform better when the relevant information is located at the beginning or end of the input context.

However, when relevant context is in the middle of longer contexts, the retrieval performance is degraded considerably. This is also the case for models specifically designed for long contexts.

Source

Extended-context models are not necessarily better at using input context. Source

Other considerations to keep in mind in terms of submitting large volumes of data is inference time (latency) and also token costs in terms of input and output.

--

--

Cobus Greyling

I explore and write about all things at the intersection of AI & language; LLMs/NLP/NLU, Chat/Voicebots, CCAI. www.cobusgreyling.com