Files
hermes-brain/projects/passepartout/architecture/design/engineering-infrastructure/definite-description-resolution.org

1.6 KiB
Raw Blame History

Definite Description Resolution

When the user says "the function that validates secrets," the agent must resolve this to a specific code entity. Natural language is ambiguous — there might be multiple functions matching the description. Resolving to the wrong one causes incorrect actions.

Principia Mathematica's theory of descriptions addresses this: "the current king of France is bald" — a sentence that seems to refer to something that doesn't exist. PM formalizes ιx(φx) as "the unique x such that φ holds." A statement is false (not meaningless) when there is no unique x satisfying φ.

A cognitive tool that checks descriptional uniqueness before resolution:

(def-cognitive-tool :resolve-reference
    (query-string &key (max-candidates 10)
                   (context-path *current-context*))
  "Resolve a definite description to a unique referent."
  (let ((candidates (search-knowledge-graph query-string
                                               :source-path context-path
                                               :limit max-candidates)))
    (cond
      ((null candidates)
       (values nil :no-referent query-string))
      ((> (length candidates) 1)
       (values nil :ambiguous candidates))
      (t
       (values (first candidates) :unique nil)))))

~40 lines as a skill in v0.7.2. When VivaceGraph ships (v3.0.0), descriptions become native Prolog queries with uniqueness constraints.

For the philosophical foundations, see the Whitehead analysis in the Validation section below.