Hi everyone,
I’m struggling to build a reliable 2-phase quiz bot and would appreciate some expert advice on the correct architectural pattern in Pickaxe.
The Goal:
The bot should guide a student through 3 random exercises per session. Each exercise has two phases:
-
Quiz Phase: Presents an
Exercise_Promptfrom a CSV, asks 6 pre-defined questions about it, and provides immediate correct/incorrect feedback with a storedExplanationafter each answer. -
Coaching Phase: After the quiz, the bot enters a coaching loop (max 3 attempts), guiding the student to rewrite the original
Exercise_Promptcorrectly. If they fail, it shows theModel_Solution.
My data is a single CSV in the Knowledge Base with columns like Exercise_Prompt, Answer_1, Explanation_1… Model_Solution.
The Path of Failure: What I’ve Tried Chronologically
-
Attempt 1: Simple Prompt with RAG:
My first approach was a chatbot with a prompt to “pick a random exercise from the CSV file” in the Knowledge Base. Result: Complete failure. The bot always hallucinated its ownExercise_Promptand questions, ignoring the CSV content entirely. -
Attempt 2: Two-Action Workflow (and PYTHON VS. JAVASCRIPT Confusion):
I then attempted a more complex two-Action workflow. The first Action was meant to retrieve a random row, and the second (the chatbot) was meant to receive it as context.
Result: Complete failure again. A key point of confusion was that the Pickaxe Action environment is Python, yet recommendations from Pickaxe doorman / support bot seemed to suggest JavaScript syntax (await pickaxe.get(...)). I was unable to determine how to correctly write the data-fetching logic. Ultimately, debugging with the chatbot confirmed the data was never passed between the Actions. The bot itself stated it could not “see” the CSV content and was forced to invent everything. -
Attempt #3: Hard-Coding Data Directly into the Action Code:
As a last-ditch effort, I abandoned reading an external file. I manually copied the content of CSV (the exercise data) and pasted it as a giant string or dictionary directly into the Action’s code. The theory was that if the data is inside the bot’s own code, it cannot possibly ignore it.
Result: Catastrophic and chaotic failure. The bot would sometimes correctly state theExercise_Promptbut then proceed to hallucinate its own questions, ignoring the hard-coded Q&A data. Even worse, in instances where it did use the correct data, it would mismatch pairs; for example, it would correctly evaluate the answer toQuestion 1but attach theExplanationfromQuestion 6.
Given these repeated and varied failures, is my desired scenario—a stateful, turn-by-turn bot that reliably reads and processes data from one specific CSV row per session—an architecturally supported use case in Pickaxe?
Am I trying to force a “database-like” behavior from a system that isn’t designed for it? I need to know if this is a problem with my implementation, or a fundamental limitation I’m hitting, so I can choose a different strategy.
Any guidance on the correct, robust pattern for this would be immensely helpful.
Thank you.