Building an AI agent with OpenAI tool use — struggling with consistency. How do you enforce tool call order reliably?
Hey,
Software engineer here, relatively new to agentic workflows. Building a production AI concierge — user says "I'm going to Budapest tomorrow, plan my day" → agent searches our offer database, builds a plan, user books everything in one flow.
**Stack:** OpenAI GPT-5.5 + tool use, NestJS, SSE streaming, React Native. Tools: `search_offers`, `get_offer_details`, `calculate_price`, `prepare_booking_bundle`.
**The problem:** Consistency. Two main issues:
- Model hallucinates offers from training data instead of calling `search_offers`. It knows a lot about European tourism and just... uses that knowledge instead of querying our DB.
- Tool chains break mid-flow. After `search_offers` returns results, model sometimes responds in plain text instead of continuing to `get_offer_details` → `calculate_price`.
Tried explicit prompt rules, `__next` instructions embedded in tool results, reducing tool count. Helps but doesn't fully solve it.
**Questions:**
- What frameworks/tools are you using for production agentic flows?
- How do you enforce tool call sequences reliably?
- Any techniques for preventing hallucination in tool-use agents specifically?
Appreciate any advice from people who've shipped this stuff in production.