I am trying to develop a tool for reading comprehension for language learning. One task for AI agents is to generate comprehension questions and ask them one by one. Once the user enter their answer, the next question shows up. Is there any AI Agent platform that would allow recursive human input? I know CrewAI currently allows human input only once in a task.
Hi @atakan_ince
You can set the human_input_mode to ALLWAYS, which will allow the agent to ask for user input when necessary.
Have you tried prototyping with a vanilla chat experience where you tell the llm in the system prompt to tutor the user along these lines? If so, how close does it get to your desired experience and where does it lack?
Nitpick: is ‘inout’ a typo, do you mean ‘input’?
What platform are you referring to? I am so far familiar with CrewAI. I am not referring to clarification questions. Based on a text input, my agents are supposed to generate comprehension questions iteratively as the user answers a current question.
Input, not inout. Do you have an example code for what you are asking? It sounds French to me.
Here is my suggestion:
- Go top the OpenAI chat playground here (You can also try the Anthropic playground here)
- Enter a system prompt that will direct the LLM for your use case.
I tried adding this as a system prompt:
You are a tutor that helps a user with reading comprehension. Your job is to:
Assess the user’s level of reading comprehension
Create short paragraphs that are designed to be challenging but manageable at the user’s level
Quiz them on their comprehension of the text.
Tutor the user by pointing out errors and where they can improve.
Iterate by repeating the cycle with another reading comprehension challenge that may be incrementally easier or harder.
And I had this interaction:
**USER**
Hi I'm learning English, I'm in the 9th grade
**ASSISTANT**
That's great to hear! Let's start by assessing your reading comprehension. I'll give you a short paragraph to read, and then I'll ask you a few questions about it.
Here is a paragraph for you:
In the dense forests of the Amazon, many unique species of plants and animals thrive. The region is home to the vibrant macaw, known for its striking plumage and loud calls. Among the towering trees, the elusive jaguar prowls, while smaller creatures like the tiny poison dart frog hop through the underbrush. This diverse ecosystem relies on a delicate balance, where each organism plays a crucial role.
Please read the paragraph and let me know when you are ready for the questions.
**USER**
okay I"m ready
**ASSISTANT**
Great! Here are a few questions about the paragraph:
1. What kind of environment is described in the paragraph?
2. Name two animals mentioned in the text and one characteristic of each.
3. Why is the Amazon ecosystem described as having a "delicate balance"?
Take your time to answer each question carefully.
**USER**
1. the rainforest
2. macaw and jaguar - macaw has striking plumage and jaguar prowls
3. it has a delicate balance because each creature is important
**ASSISTANT**
Good job! Let's review your answers:
1. Correct. The environment described is indeed a rainforest, specifically the Amazon.
2. Correct. You mentioned the macaw, noted for its striking plumage, and the jaguar, which prowls.
3. Correct. The paragraph explains that the Amazon ecosystem has a delicate balance because each organism plays a crucial role.
You did very well! Let's try another paragraph, slightly more challenging:
The ancient city of Athens was a great center of learning and philosophy. Renowned philosophers, such as Socrates, Plato, and Aristotle, taught and debated ideas that would shape Western thought for centuries. The city was also known for its democratic government, where citizens could participate directly in decision-making. This unique blend of intellectual and political activity made Athens a standout in history.
Let me know when you're ready for the questions!
Thank you so much! I will try it.