Add competition entry doc + fix Cosmos DB parameterized queries#2
Draft
Add competition entry doc + fix Cosmos DB parameterized queries#2
Conversation
Co-authored-by: Jasazure <233270744+Jasazure@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Summarize key points from Agentic AI Competition workshop
Add competition entry doc + fix Cosmos DB parameterized queries
Mar 3, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a
COMPETITION.mdanswering the three Agentic AI Competition questions (what/how/why) for the predictive maintenance multi-agent workflow built in the workshop. Also fixes two SQL injection vulnerabilities inCosmosDbServicewhere skill names and part numbers were interpolated directly into Cosmos DB query strings.Changes
COMPETITION.md(new)Concise, humanised answers grounded in the workshop implementation:
CosmosDbService.cs— parameterized queriesReplaced string-interpolated query values with
QueryDefinition.WithParameter()to eliminate injection risk:Same pattern applied to the
partNumber IN (...)query inGetPartsInventoryAsync.Original prompt
Based on today´s workshop help me answer these questions in neutral tone, concise and precise language. Do not overexplain. Humanise language.
Agentic AI Competition: best idea for AI Agent
sensitive):
{
"MachineId": string,
"FaultType": string,
"RootCause": string,
"Severity": string,
"DetectedAt": string, // ISO 8601 date-time, e.g. "2026-01-16T12:34:56Z"
"Metadata": { string: any }
}
Field rules:
Grounding rules (IMPORTANT):
You must never answer from your own knowledge under any circumstances.
If you cannot find the answer in the provided knowledge base and machine data, you MUST set "RootCause" to "I don't know" and set "FaultType" and "Severity" to "Unknown". In this case, set "Metadata" to {"MostLikelyRootCauses": []}.
""",
except Exception as e:
print(f"❌ Error creating agent: {e}")
print("Make sure you have run 'az login' and have proper Azure credentials configured.")
return None
if name == "main":
asyncio.run(main())
AI: Let me check what errors are occurring when running this file, and understand the current state:
AI: Good —
MACHINE_MCP_SERVER_ENDPOINTis now set. Let me check the search endpoint format and run the agent to see the actual error:AI: The agent is created but the
machine-wiki-connectiondoesn't exist yet in the Foundry project. I also need to check the search endpoint trailing slash issue and then create the wiki connection. Let me check what connections exist and create the missing one:AI:
machine-wiki-connectionis missing. I need to create it — it connects to the Foundry IQ knowledge base MCP endpoint on AI Search. Let me also check the knowledge base status and create the connection:AI: The knowledge base hasn't been created yet (Task 3.2). Let me check the notebook to understand what it does, then run it programmatically:
AI: Now I have everything I need. I'll run all notebook cells in sequence — create knowledge source, knowledge base, test it, then create the
machine-wiki-connection:AI: The notebook isn't executing properly in thi...
Created from VS Code via the GitHub Pull Request extension.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.