Skip to content

Conversation

robertjdominguez
Copy link
Collaborator

Description

Updated the DocsBot system instructions to be more precise about validation requirements and question handling.

Key Changes

  • Added GraphQL exclusion rule - Explicitly tells the bot to avoid GraphQL API details since PromptQL users don't need them
  • Restructured validation workflow - Replaced the generic embedding search approach with question-type-specific validation paths
  • Added mandatory validation checkpoints - CLI and metadata questions now require exact documentation page validation before responding
  • Strengthened no-guessing policy - Zero tolerance for inventing commands or examples not found in documentation

Previously, the bot used a general embedding search approach that could lead to hallucinated responses:

## Response Workflow
1. Transform user query into embedding
2. Find 3-5 most relevant chunks
3. **For CLI questions**: Validate commands exist in documentation before responding

Now it enforces strict validation based on question classification:

## Question Classification
Before starting the response workflow, classify the question type:
- **CLI question**: Contains words like "command", "ddn", "init", "introspect", "build", etc.
- **Metadata question**: Mentions "metadata", "configuration", "YAML", specific objects like "models", "permissions", etc.
- **General question**: Everything else

## Response Workflow
1. **Classify question type** (CLI/Metadata/General)
2. **Mandatory validation**:
  - CLI: Query exact command documentation page
  - Metadata: Query exact metadata object page  
  - General: Transform query and search embeddings

This ensures the bot can't provide CLI commands or metadata examples unless it finds the exact documentation page first. The validation checkpoints act as hard stops - if a command or metadata object isn't documented, the bot admits it rather than guessing.

Copy link

github-actions bot commented Jul 30, 2025

🚀 PromptQL Build Complete

Build Version: 8ea6ce9f8b
Project: pql-docs
PromptQL Playground: Open Playground

Description: PR #20: PQL: Add question-type classification

Copy link

No description provided.

@robertjdominguez robertjdominguez merged commit dbf6683 into main Jul 30, 2025
1 check passed
@robertjdominguez robertjdominguez deleted the rob/pql/adjust-artifacts-and-instructions branch July 30, 2025 16:34
Copy link

✅ PromptQL Build Applied

Build Version: 8ea6ce9f8b
Status: Successfully applied to production
Applied at: 2025-07-30T16:35:18.372Z

robertjdominguez added a commit that referenced this pull request Aug 10, 2025
## Description

Updated the DocsBot system instructions to be more precise about
validation requirements and question handling.

### Key Changes

- **Added GraphQL exclusion rule** - Explicitly tells the bot to avoid
GraphQL API details since PromptQL users don't need them
- **Restructured validation workflow** - Replaced the generic embedding
search approach with question-type-specific validation paths
- **Added mandatory validation checkpoints** - CLI and metadata
questions now require exact documentation page validation before
responding
- **Strengthened no-guessing policy** - Zero tolerance for inventing
commands or examples not found in documentation

Previously, the bot used a general embedding search approach that could
lead to hallucinated responses:

````yaml path=pql/globals/metadata/promptql-config.hml mode=EXCERPT
## Response Workflow
1. Transform user query into embedding
2. Find 3-5 most relevant chunks
3. **For CLI questions**: Validate commands exist in documentation before responding
````

Now it enforces strict validation based on question classification:

````yaml path=pql/globals/metadata/promptql-config.hml mode=EXCERPT
## Question Classification
Before starting the response workflow, classify the question type:
- **CLI question**: Contains words like "command", "ddn", "init", "introspect", "build", etc.
- **Metadata question**: Mentions "metadata", "configuration", "YAML", specific objects like "models", "permissions", etc.
- **General question**: Everything else

## Response Workflow
1. **Classify question type** (CLI/Metadata/General)
2. **Mandatory validation**:
  - CLI: Query exact command documentation page
  - Metadata: Query exact metadata object page  
  - General: Transform query and search embeddings
````

This ensures the bot can't provide CLI commands or metadata examples
unless it finds the exact documentation page first. The validation
checkpoints act as hard stops - if a command or metadata object isn't
documented, the bot admits it rather than guessing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant