Generative AI for Genealogy – Part VI

Follow‑Up Questions: The Real Fun Begins

A follow‑up question means repeating the entire dance, but with more context:

  • Prompt
  • Question 1
  • Tool call
  • Data
  • Answer 1
  • Question 2

Let’s visualise it:

  1. User types question
  2. App determines skill + examples, sends prompt + question
  3. LLM asks for a tool
  4. App sends everything + tool call + data
  5. LLM replies with an answer
  6. App displays answer
  7. User asks follow‑up
  8. App sends new prompt + full conversation + new question
  9. LLM asks for a tool
  10. App sends everything + tool call + data
  11. LLM replies
  12. App displays answer

And yes, we skipped the part where a different LLM determines the skill. Let’s add that back in:

Chaining Questions and Answers

We’re not limited to a single tool call per question. The LLM can ask for multiple tools in one go.

Example:

“How old are Bart and Lisa?”

LLM replies:

``` get-data:Bart```
``` get-data:Lisa```

You return the data, and it answers:

“Bart is 10 years old and Lisa is 8 years old.”

Brilliant.

But some questions require sequential reasoning.

Example:

“Where was Dave born? And which counties neighbour that place?”

To answer:

  1. First find Dave’s birthplace
  2. Then find neighbouring counties

Models like Reasoner v1 can handle this, but you need two mechanisms:

  • If the LLM asks for a tool, you provide the data and ask again
  • You detect FINAL ANSWER: to know when it’s done

This loop continues until the LLM stops asking for tools and finally answers the question.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *