"""add_corpus_doc.py: your turn, create a question that needs THREE hops, then make the agent solve it.

The solution corpus answers a two-hop question (billing -> Payments team -> Dana Okafor). Add two
documents that introduce a third hop, for example:
    D6: "Dana Okafor reports to the VP of Engineering, Priya Nair."
and ask: "Who does the leader of the team that runs billing report to?"  (billing -> Payments ->
Dana -> Priya). A single retrieval cannot do this; the agent must search three times.

Steps:
  1. Add your documents to corpus.DOCS (or a copy of corpus.py).
  2. Ask the question through agent.agentic_rag and check it searches enough times and cites the docs.
  3. Run:  python add_corpus_doc.py

Worked two-hop version is in ../solution/.
"""

import sys, os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "solution"))
import corpus
import agent

# TODO 1: add the documents that create a third hop.
corpus.DOCS["D6"] = "Dana Okafor reports to the VP of Engineering, Priya Nair."

if __name__ == "__main__":
    # TODO 2: with a real key in .env, ask the three-hop question and inspect searches + sources.
    # (Offline, reuse the mock pattern from ../solution/demo_mock.py and extend it for the extra hop.)
    question = "Who does the leader of the team that runs billing report to?"
    print("Ask this through agentic_rag once your key is set:", question)
    print("Expect: 3 searches, sources include the billing, Payments-lead, and reports-to documents.")
