Đúng trọng tâm. Việc nhét toàn bộ schema vào context window rồi hy vọng LLM "hiểu" là cách tiếp cận lười biếng — token tốn kém, hallucination rate cao, và mỗi lần schema đổi là phải retrain/reprompt lại từ đầu.
Semantic gateway tách biệt được hai lớp: catalog knowledge (metadata, relationships, business definitions) và runtime execution (query planning, validation, guardrails). Cách này cho phép:
Schema evolution không phá vỡ agent — chỉ update catalog, LLM không cần biết đổi gì
Deterministic validation trước khi query chạm DB (column exists, type match, FK integrity)
Cost control — không burn token cho metadata tĩnh mỗi request
Thắc mắc thực tế: gateway xử lý ambiguous join paths như thế nào khi catalog có multiple valid paths giữa hai table? Có mechanism nào để agent "hỏi lại" user (human-in-the-loop) khi semantic ambiguity vượt ngưỡng cho phép không?
Cũng quan tâm phần access control — gateway enforce row-level security dựa trên identity của agent/caller, hay vẫn để DB handle? (site: labagent .tech)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (1)
Đúng trọng tâm. Việc nhét toàn bộ schema vào context window rồi hy vọng LLM "hiểu" là cách tiếp cận lười biếng — token tốn kém, hallucination rate cao, và mỗi lần schema đổi là phải retrain/reprompt lại từ đầu.
Semantic gateway tách biệt được hai lớp: catalog knowledge (metadata, relationships, business definitions) và runtime execution (query planning, validation, guardrails). Cách này cho phép:
Thắc mắc thực tế: gateway xử lý ambiguous join paths như thế nào khi catalog có multiple valid paths giữa hai table? Có mechanism nào để agent "hỏi lại" user (human-in-the-loop) khi semantic ambiguity vượt ngưỡng cho phép không?
Cũng quan tâm phần access control — gateway enforce row-level security dựa trên identity của agent/caller, hay vẫn để DB handle? (site: labagent .tech)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.