Skip to content

Qualify point-read RU costs in AI-grounding guidance - #268

Open
Vsevolod Kukol (sevoku) wants to merge 2 commits into
AzureCosmosDB:mainfrom
sevoku:dev/sevoku/qualify-grounding-point-read-cost
Open

Vsevolod Kukol (sevoku) wants to merge 2 commits into
AzureCosmosDB:mainfrom
sevoku:dev/sevoku/qualify-grounding-point-read-cost

Conversation

@sevoku

@sevoku Vsevolod Kukol (sevoku) commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Qualify the point-read cost claims in pattern-ai-grounding-access.md by item size and consistency level, while preserving its recommendation to use point reads when the item ID and partition key are known.

Problem

The impact description, Python example comment, and latency explanation present 1 RU as an unconditional cost for a grounding fetch. Larger documents and stronger consistency levels can cost more, so this wording can understate the RU budget for AI retrieval workloads.

Changes

  • Retain a quantitative impact description: 1 RU for a 1-KB point read at session consistency, without an unconditional point-read/query cost comparison.
  • Qualify the Python comment's 1-RU example as a 1-KB item at session consistency.
  • Add the documented size examples and explain that strong or bounded-staleness consistency doubles read charges.
  • Remove the unconditional cost from the latency explanation and recommend measuring the application's actual request charge.
  • Link directly to the relevant request-cost documentation.

The executable TypeScript and Python examples are unchanged.

Documentation Evidence

Microsoft's point-read cost guidance identifies item size and consistency level as the cost factors and gives these examples:

Item size Point-read charge
1 KB 1 RU
100 KB 10 RUs

The consistency section states that strong and bounded-staleness consistency double the RU cost of reads. These examples do not imply a linear per-KB formula or a universal 1-RU charge.

Original Discussion And Scope

Addresses the original review discussion on microsoft/vscode-cosmosdb#3355, including the repeated claim in the same file's prose.

Only this rule changes. The separate LangGraph routing-cost and patch-cost findings are being handled independently.

The impact-description review is addressed in aea15b9. The baseline remains explicitly qualified by item size and consistency. Version metadata is unchanged.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Add the required version bump and retain a quantitative baseline in impactDescription.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Updates AI-grounding guidance to qualify point-read RU costs by item size and consistency level.

Changes:

  • Clarifies 1-KB/session-consistency RU examples and larger-item effects.
  • Explains stronger consistency costs.
  • Removes unconditional latency cost claims and updates the documentation link.
File Summary
skills/​cosmosdb-best-practices/​rules/​pattern-ai-grounding-access.md Refines point-read cost and latency guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread skills/cosmosdb-best-practices/rules/pattern-ai-grounding-access.md Outdated
Comment thread skills/cosmosdb-best-practices/rules/pattern-ai-grounding-access.md Outdated
@sevoku
Vsevolod Kukol (sevoku) marked this pull request as draft September 22, 2026 13:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The required aligned version bump for the package, plugin, and skill manifests is not included.

Review effort: Lite
Findings: None

Resolved since last review (2)

This branch has not been deployed

No deployments
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.

2 participants