> For the complete documentation index, see [llms.txt](https://primer.ought.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://primer.ought.org/chapters/long-texts.md).

# Long Texts

Ultimately we’d like for language models to help us make sense of more information than we can read and understand ourselves. As a small step in that direction, let’s make a recipe that answers questions about research papers.

To do so, we’ll:

1. [Parse and load papers](/chapters/long-texts/loading-paper-text.md)
2. [Find the relevant parts of papers](/chapters/long-texts/finding-relevant-paragraphs.md)
3. [Answer given those relevant parts](/chapters/long-texts/answering-given-paragraphs.md)

In this tutorial, we’ll take a simple approach to step 2: We’ll classify for each paragraph whether it answers the question or not. We then take the paragraphs with the highest probability of answering the question and ask a model to answer the question given those paragraphs, reusing [the question-answering recipe](#answering-the-question-given-the-top-paragraphs-with-subrecipes).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://primer.ought.org/chapters/long-texts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
