mirror of
https://github.com/BillyOutlast/posthog.git
synced 2026-02-04 03:01:23 +01:00
## Problem The current documentation for the `person_id_join_limitation` in HogQL AI generation is unclear and lacks comprehensive guidance on how to properly handle joins involving person_id fields. This leads to agents creating queries that result in ClickHouse errors due to forward references to override tables. ## Changes Enhanced the `person_id_join_limitation` documentation in both `ee/hogai/graph/sql/prompts.py` and `posthog/hogql/ai.py` to: ## How did you test this code? Hopefully it solves [https://us.posthog.com/project/2/error_tracking/0199e7eb-4ec0-73b1-8bc5-937a564aa75d?timestamp=2025-11-10T12%3A14%3A39.085000-08%3A00](error), will monitor