How It Works - SerhatSoruklu/chatpdm GitHub Wiki

How ChatPDM Works

ChatPDM processes every query through a fixed deterministic pipeline.

Flow

input → normalize → classify → validate → resolve / refuse

Steps

1. Normalize

  • standardizes input text
  • removes superficial variation

2. Classify

  • determines query shape
  • examples:
    • exact concept
    • subtype
    • comparison
    • relation

3. Validate Constraints

  • checks if the query fits authored rules
  • blocks unsupported composition
  • internal enforcement layer (referred to in code as "ZeroGlare")

4. Resolve or Refuse

  • resolve if a valid concept mapping exists
  • refuse if:
    • no exact match
    • out of scope
    • invalid composition

Output

Every response follows a fixed contract:

  • type
  • query interpretation
  • resolution method
  • suggestions (if applicable)

No step introduces new meaning at runtime.