GenUI State Management: Astro vs Next.js RSC — Frontend (P2)

In the previous part, we agreed on discarding Chatbots to move towards Generative UI. But for AI to “spawn” UI Components right on the user’s screen, the Frontend and Backend cannot just communicate via standard stateless APIs. They need to share a common State. The problem is: The AI’s brain and the User’s browser speak two entirely different languages. 2.1. Clear Demarcation: AIState vs UIState When building an Agentic system with an Interface, the first vital rule is to strictly separate AIState and UIState. ...

May 16, 2026 · 4 min · Lê Tuấn Anh

Critique Loop: Preventing LLM Hallucination

In Part 4: Active RAG & Strict Tool Calling - Connecting LLMs to Real-time APIs, we successfully built a cyclic ReAct graph allowing the LLM to call APIs to check inventory and promotions in real-time. However, in a real-world production environment, giving an LLM access to Tools is not enough to guarantee absolute accuracy. A very common phenomenon is Hallucination or constraint omission: The LLM receives data indicating zero inventory from a Tool, yet in its final synthesized answer, it still recommends that product to the customer; or it ignores the maximum price filter explicitly requested by the user in the initial query. ...

May 22, 2026 · 8 min · Vesviet Team