Data and Knowledge Systems · Principal
Search found the newest policy. Why did the assistant apply next month's rule today?
Take a few minutes to form your approach. Then open a worked answer and compare the decisions.
Reveal a worked answer
Because newest by publication or indexing time is not necessarily effective now. A policy approved on 20 September may be published immediately but take effect on 1 October. The search index sees a fresh and highly relevant document. The assistant uses it to answer a question about a transaction on 28 September. Retrieval did its ordinary relevance job and still selected the wrong rule for the decision time.
I would keep at least the policy version, effective-from and effective-until times, publication state and source authority with each indexed passage. The answer needs an explicit as-of time. For “what applies to this transaction,” that may be the transaction time under the organization's rules, not the current clock. A query about a historical case can require a different version from a question about a future plan. PostgreSQL's range-type documentation describes temporal ranges and nonoverlap constraints. Those are useful implementation tools for the authoritative rule table, but a vector index alone does not become a policy engine just because each chunk has a date.
Filter or validate candidates against the effective interval before a rule is used for an action. Do it in the trusted service against the authoritative version if the decision is consequential. Handle timezone and half-open interval boundaries explicitly. If two conflicting versions claim the same time or no authoritative version covers it, return a conflict or ask for review instead of letting relevance score pick the winner. Cite the version and applicable interval in the answer so a reader can audit the choice.
There is a second clock too. When did our system learn that a correction was made? A rule corrected on 5 October with a retroactive effective date of 1 September may change today's answer to “what rule was legally in force on 28 September,” while leaving a separate audit question about what the agent knew on 28 September. Keep source history if both questions matter. Which policy source wins when the newer indexed copy is wrong? addresses a newer indexed copy contradicting its authoritative source. This case can have two valid source versions. The error is choosing by freshness when the query is about effective time.
Continue reading
Related questions
Read beyond the question
Explore more data and knowledge systems
Follow another question in this area, or search the complete Question Library.
Browse this area →Browse Question Library →