Fetching Context and Multi-Modality
Introduction to Fetching Context with LLMs
In this lesson, we will explore how Large Language Models (LLMs) can fetch context from various sources to enhance their responses. Context is crucial in interactions with LLMs as it allows the model to provide more accurate and relevant answers. Providing context manually might be a time-consuming process. By understanding how to provide context effectively, you can improve the quality of the responses you receive from LLMs and work with them more efficiently.
Contextual Summarization with LLMs
Let's examine how LLMs can summarize material to provide a concise overview. This is particularly useful when you want the LLM to make better judgments in subsequent requests.
Imagine you have a piece of material that you want the LLM to summarize. You can start by providing the material and asking for a summary:
The LLM will then generate a summary based on the provided material. This helps the LLM understand the key points, which can be helpful for future interactions. You can follow up the summarization with the following:
- Ask the LLM to improve the material based on some feedback,
- Ask the LLM to generate a summary handout,
- Ask the LLM to come up with practice questions or exercises.
Extracting Context from Uploaded Files
Next, let's explore how LLMs can fetch context from files you upload in CosmoCPT, such as PDFs. This is useful when you have documents that you want the LLM to interpret or explain.
Imagine you have a PDF with an assignment, and you want the LLM to explain its format. You can upload the PDF and ask the LLM to provide an explanation:
Start by clicking the attachment icon in the input field:

Once the file is attached, you will see it appear in the input area. Now you can write your prompt:

The LLM will analyze the PDF and provide an explanation of its format, such as the structure of the questions or the layout of the document. Here is an example of a summarized document:

