AI Agent Use Cases

Added today

44All 189

Prompt to Prepare a Shopping Cart from a Recipe Photo

The author reports that Grok Bot receives a recipe photo, organizes the ingredients and quantities, and creates a shopping list by excluding ingredients already available at home.

Grok Bot
Life & Hobbies

1–20 of 189

Work & ResearchWalkthrough

Reading a PDF and Following Up on Previous Questions

This is a public example where the author finds relevant information in a PDF to answer questions, and continues previous questions within the same conversation.

How it works

  1. The author installs dependencies from the example folder and prepares a model API key and the PDF to read. The execution method is to add the file path after --pdf.
  2. After converting the document into searchable material, the author finds and answers content related to the question. If --question is omitted, questions can be entered continuously in the terminal.
  3. In conversation mode, a memory is connected that stores previous questions and answers. In single-question mode, the number of referenced document fragments is also displayed.

Results

This is an implementation of document querying that supports both single questions and continuous conversation. The author summarizes the operation of the public code, but did not independently measure answer accuracy.

Notes

The author notes that the PDF must first be checked to ensure it contains readable text. The public example does not separately implement OCR for scanned documents or citation of pages for each answer.

Source

GitHub Original post ↗

Example prompt · LlamaIndex

Create a tool that answers questions from a [PDF file]. The execution environment is [Python environment] and results are stored in the [output folder]. First, read the README and code of the public example agents/03-pdf-qa-agent and organize the required packages and API settings.

Connect and distinguish between single-question mode and conversation mode that continues previous questions. Ensure that if the user changes the file, previous document answers are not mixed in, and supplement the tool so that it responds that it cannot confirm questions not found in the document. The original example only outputs the number of referenced fragments, so also suggest an improvement to show the sentences and pages used in the answer for verification.

Test with a PDF containing text, an empty file, and a question not answered in the document. Compare answers with the original text and check whether follow-up questions in conversation mode refer to the same subject. Leave the installation steps, execution commands, examples with answers and evidence, and any unverified behaviors as deliverables. Distinguish between features confirmed in the public code and the new requirements added this time.