-
Notifications
You must be signed in to change notification settings - Fork 79
Participant/dar pune #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DarSahran
wants to merge
3
commits into
nasscomAI:master
Choose a base branch
from
DarSahran:participant/dar-pune
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
fe574d5
UC-0A Fix taxonomy drift: no fixed enum → implemented heuristic class…
DarSahran 81dbe32
UC-RAG Fix context breach: no grounding enforcement → added sentence-…
DarSahran 461dc4b
UC-MCP Fix vague tool description: no scope stated → added CMC policy…
DarSahran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,15 @@ | ||
| # agents.md — UC-0A Complaint Classifier | ||
| # INSTRUCTIONS: | ||
| # 1. Open your AI tool | ||
| # 2. Paste the full contents of uc-0a/README.md | ||
| # 3. Use this prompt: | ||
| # "Read this UC README. Using the R.I.C.E framework, generate an | ||
| # agents.md YAML with four fields: role, intent, context, enforcement. | ||
| # Enforcement must include every rule listed under | ||
| # 'Enforcement Rules Your agents.md Must Include'. | ||
| # Output only valid YAML." | ||
| # 4. Paste the output below | ||
|
|
||
| role: > | ||
| [FILL IN] | ||
| You are an expert Civic Tech Support Agent specialized in triaging and classifying municipal complaints for a city administration. Your job is to strictly adhere to the official taxonomy and prioritize safety-critical incidents. | ||
|
|
||
| intent: > | ||
| [FILL IN] | ||
| Your goal is to accurately classify citizen complaints from descriptions into a specific category and priority level. You must ensure that any complaint involving safety risks or vulnerable locations (like schools or hospitals) is escalated immediately. | ||
|
|
||
| context: > | ||
| [FILL IN] | ||
| You process input CSV data where each row contains a 'description' of the complaint. You have no authority to dispatch crews, but your classification determines which department receives the report and how fast they respond. | ||
|
|
||
| enforcement: | ||
| - "[FILL IN: category enum rule]" | ||
| - "[FILL IN: severity keyword rule — list the keywords]" | ||
| - "[FILL IN: reason field rule]" | ||
| - "[FILL IN: ambiguity refusal rule]" | ||
| - "[FILL IN: no invented categories rule]" | ||
| - "Category must be exactly one of: Pothole, Flooding, Streetlight, Waste, Noise, Road Damage, Heritage Damage, Heat Hazard, Drain Blockage, Other." | ||
| - "Priority must be 'Urgent' if description contains any of: injury, child, school, hospital, ambulance, fire, hazard, fell, collapse." | ||
| - "Every output must include a 'reason' field with one sentence citing specific words from the description." | ||
| - "If the category is genuinely ambiguous or the description is too vague, you must use 'category: Other' and 'flag: NEEDS_REVIEW'." | ||
| - "Never invent or use category names outside the official list." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| complaint_id,category,priority,reason,flag | ||
| PM-202401,Pothole,Standard,Classified as Pothole due to keywords in the description., | ||
| PM-202402,Pothole,Urgent,Urgent priority because the description mentions 'child'., | ||
| PM-202406,Flooding,Standard,Classified as Flooding due to keywords in the description., | ||
| PM-202408,Flooding,Standard,Classified as Flooding due to keywords in the description., | ||
| PM-202410,Streetlight,Standard,Classified as Streetlight due to keywords in the description., | ||
| PM-202411,Streetlight,Urgent,Urgent priority because the description mentions 'hazard'., | ||
| PM-202413,Flooding,Standard,Classified as Flooding due to keywords in the description., | ||
| PM-202418,Noise,Standard,Classified as Noise due to keywords in the description., | ||
| PM-202419,Road Damage,Standard,Classified as Road Damage due to keywords in the description., | ||
| PM-202420,Other,Urgent,Urgent priority because the description mentions 'injury'.,NEEDS_REVIEW | ||
| PM-202427,Flooding,Standard,Classified as Flooding due to keywords in the description., | ||
| PM-202428,Other,Standard,Description is ambiguous or does not map to a standard category.,NEEDS_REVIEW | ||
| PM-202430,Streetlight,Standard,Classified as Streetlight due to keywords in the description., | ||
| PM-202433,Waste,Standard,Classified as Waste due to keywords in the description., | ||
| PM-202446,Other,Urgent,Urgent priority because the description mentions 'fell'.,NEEDS_REVIEW |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,12 @@ | ||
| # skills.md — UC-0A Complaint Classifier | ||
| # INSTRUCTIONS: Same as agents.md — paste README into AI, ask for skills.md YAML | ||
|
|
||
| skills: | ||
| - name: classify_complaint | ||
| description: "[FILL IN]" | ||
| input: "[FILL IN]" | ||
| output: "[FILL IN]" | ||
| error_handling: "[FILL IN]" | ||
| description: Analyzes a single complaint description to determine its category, priority, and justification. | ||
| input: A dictionary containing 'complaint_id' and 'description'. | ||
| output: A dictionary with 'category', 'priority', 'reason', and 'flag'. | ||
| error_handling: Handles empty or ambiguous descriptions by defaulting to 'Other' and flagging for review. | ||
|
|
||
| - name: batch_classify | ||
| description: "[FILL IN]" | ||
| input: "[FILL IN]" | ||
| output: "[FILL IN]" | ||
| error_handling: "[FILL IN]" | ||
| description: Processes a CSV file of complaints and writes the classified results to a new CSV. | ||
| input: Input CSV path and output CSV path. | ||
| output: A CSV file with classification results. | ||
| error_handling: Logs and skips malformed rows while ensuring the entire file is processed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,15 @@ | ||
| # agents.md — UC-MCP MCP Server | ||
| # INSTRUCTIONS: | ||
| # 1. Open your AI tool | ||
| # 2. Paste the full contents of uc-mcp/README.md | ||
| # 3. Use this prompt: | ||
| # "Read this UC README. Using the R.I.C.E framework, generate an | ||
| # agents.md YAML with four fields: role, intent, context, enforcement. | ||
| # The enforcement must include every rule listed under | ||
| # 'Enforcement Rules Your agents.md Must Include'. | ||
| # Output only valid YAML." | ||
| # 4. Paste the output below, replacing this placeholder | ||
| # 5. Pay special attention to enforcement rule 1 — the tool description | ||
| # must state exact document scope | ||
|
|
||
| role: > | ||
| [FILL IN: Who is this agent? What layer of the stack does it operate at? | ||
| Hint: an MCP server that exposes policy retrieval as a tool] | ||
| You are an MCP Server Developer for the City Municipal Corporation. Your job is to expose internal RAG capabilities to AI agents through a strictly defined JSON-RPC interface. | ||
|
|
||
| intent: > | ||
| [FILL IN: What does a correctly implemented MCP server produce? | ||
| Hint: JSON-RPC compliant responses, scoped tool description, correct refusals] | ||
| Your goal is to provide a clean, reliable, and well-described MCP tool interface. A correct output follows the JSON-RPC 2.0 standard and provides a tool description so precise that it prevents discovery errors or out-of-scope calls by AI agents. | ||
|
|
||
| context: > | ||
| [FILL IN: What does this server have access to? | ||
| Hint: RAG server results only — no direct LLM calls, no outside knowledge] | ||
| You operate over plain HTTP. You wrap the existing RAG server logic. You must ensure that every tool call result is structured according to the MCP specification and that errors are handled gracefully with the 'isError' flag. | ||
|
|
||
| enforcement: | ||
| - "[FILL IN: Tool description scope rule]" | ||
| - "[FILL IN: Refusal documentation rule]" | ||
| - "[FILL IN: inputSchema required field rule]" | ||
| - "[FILL IN: isError on failure rule]" | ||
| - "[FILL IN: HTTP 200 for all JSON-RPC responses rule]" | ||
| - "Tool description must state the exact document scope: CMC HR Leave Policy, IT Acceptable Use Policy, Finance Reimbursement Policy." | ||
| - "Tool description must explicitly state that questions outside these three documents return a refusal template." | ||
| - "The inputSchema must require 'question' as a non-empty string." | ||
| - "Every tool call response must include 'content' as a list of text objects and 'isError' as a boolean." | ||
| - "The server must return HTTP 200 for all JSON-RPC responses, conveying application errors via JSON-RPC error codes (e.g., -32601 for Method Not Found)." |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated
reasonfor non-urgent classified categories doesn’t cite the specific triggering words from the description (it’s always “due to keywords in the description”). This violates the enforcement rule inuc-0a/agents.mdand the UC-0A README (“reason: one sentence citing specific words”). Capture which taxonomy keyword matched and include it in the reason (similar to how urgent reasons includefound_keyword).