Summarize feedback
Returns a generated feedback summary, classification, rating metrics, evidence, and confidence for a book.
/api/v1/feedbacks/{id}/summarizeSummarizeFeedback queries Rating APIServicev1.0.0Rating APIInternal HTTP and A2A gRPC service for collecting, listing, deleting, and
summarizing customer feedback for Catalog book...PublishesFeedbackCreatedIntegrationEvent, FeedbackDeletedIntegrationEventSubscribesCreateFeedback, DeleteFeedback +3APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs (GET /rating/api/v1/feedbacks/{id}/summarize) to return a synthesized summary, application-computed rating metrics, classification, supporting evidence, and confidence for a book’s customer feedback. The operation is read-only, requires Microsoft Entra ID authentication, and caches results.
Overview
| Property | Value |
|---|---|
| Bounded Context | Reviews |
| Owner Service | Rating APIServicev1.0.0Rating APIInternal HTTP and A2A gRPC service for collecting, listing, deleting, and summarizing customer feedback for Catalog book...PublishesFeedbackCreatedIntegrationEvent, FeedbackDeletedIntegrationEventSubscribesCreateFeedback, DeleteFeedback +3APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs |
| Protocol / Format | HTTP GET, application/json response |
| Gateway Endpoint | GET /rating/api/v1/feedbacks/{id}/summarize (service path /api/v1/feedbacks/{id}/summarize) |
| Authentication & Authorization | Microsoft Entra ID JWT required |
| Idempotency / Concurrency | Read-only and naturally idempotent |
| Rate Limit / Caching | Global concurrency (100), per-IP fixed-window (30 req/min), and per-user token bucket (30 limit, 20 per 10s, queue 5); cached 6 hours when reviewCount > 0, 1 minute when reviewCount == 0 |
| Contract Version | 1.0.0 (ApiVersions.V1) |
A book with zero feedback records returns 200 OK with "classification": "NoData" and does not invoke the AI model workflow. Do not treat 404 Not Found or 5xx errors as equivalent to NoData.
Request & Response Contract
Path Parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
id | string (uuid) | Yes | Valid UUID | Unique identifier of the Catalog book to summarize |
Success Response (200 OK)
Only summary is strictly required in the schema; clients should handle remaining fields defensively.
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
summary | string | Yes | Non-null | Generated narrative summary of customer feedback, or "No feedback found for this book." when reviewCount is 0 |
classification | string | No | Enum: NoData, Bad, Good, TopRated | Application-derived classification computed by deterministic business rules |
averageRating | number | null | No | double or null | Arithmetic mean rating across included feedback records (null when reviewCount is 0) |
reviewCount | integer | No | int32 | Number of feedback records included in the summary (0 when unreviewed) |
evidence | string | No | — | Supporting evidence produced by the quality assessment step (empty string when reviewCount is 0) |
confidence | string | No | Free-form string | Confidence reported by the quality assessment step (empty string when reviewCount is 0) |
Behavior & Side Effects
- AI summarization & PII redaction: When feedback exists, invokes the map-reduce-assess AI workflow with Presidio APIServicev1.0.0Presidio APIExternal HTTP sidecar API for detecting PII in text and anonymizing detected entities in the Chat and Rating AI agent pi...SubscribesAnalyzeText, AnonymizeText +3APIsOpenAPIOwnerplatform-engineering-teamDiagramOpen docs PII redaction before generating the summary.
- Deterministic classification: Returns
NoDatawhen fewer than 3 reviews exist (or average is invalid),Badwhen average< 3.5or a dominant negative pattern is found,TopRatedat average>= 4.5with50+reviews or>= 4.0with200+reviews, andGoodotherwise. - Tiered caching: Caches non-empty summaries for 6 hours and empty (
NoData) results for 1 minute; invalidated on feedback mutations.
Error Responses
| Status / Code | Condition | Client Recovery Action |
|---|---|---|
401 Unauthorized | Missing, expired, or invalid Entra ID bearer token | Re-authenticate and retry |
403 Forbidden | Authenticated principal lacks Rating API authorization | Request a token with the required Rating API scopes |
404 Not Found | Target resource or summary could not be found | Surface an unavailable/not-found state; do not treat as NoData |
429 Too Many Requests | Rate limit quota exceeded (Retry-After header included) | Wait for the Retry-After duration before retrying |
500 Internal Server Error | Downstream AI, Presidio APIServicev1.0.0Presidio APIExternal HTTP sidecar API for detecting PII in text and anonymizing detected entities in the Chat and Rating AI agent pi...SubscribesAnalyzeText, AnonymizeText +3APIsOpenAPIOwnerplatform-engineering-teamDiagramOpen docs, or Cosmos DB failure | Retry with exponential backoff; do not fall back to NoData |
Related Documentation
- Rating APIServicev1.0.0Rating APIInternal HTTP and A2A gRPC service for collecting, listing, deleting, and summarizing customer feedback for Catalog book...PublishesFeedbackCreatedIntegrationEvent, FeedbackDeletedIntegrationEventSubscribesCreateFeedback, DeleteFeedback +3APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs — Service overview, Azure Cosmos DB storage, and AI governance.
- Presidio APIServicev1.0.0Presidio APIExternal HTTP sidecar API for detecting PII in text and anonymizing detected entities in the Chat and Rating AI agent pi...SubscribesAnalyzeText, AnonymizeText +3APIsOpenAPIOwnerplatform-engineering-teamDiagramOpen docs — PII detection and anonymization service.
- FeedbackEntityv1.0.0FeedbackRepresents an individual customer's rating and optional written review for a Catalog book.Ownercatalog-experience-teamOpen docs — Feedback document model.
- List feedbacksQueryv1.0.0List feedbacksReturns feedback for a book with pagination, sorting, and validation responses.Ownercatalog-experience-teamSchemaDiagramOpen docs — Retrieve paginated individual customer reviews for a book.
Summarize feedback schema
Generated summary of feedback for a book.
Generated summary of the book's feedback.
Application-derived feedback classification.
NoData Bad Good TopRatedArithmetic mean rating; null when no feedback exists.
Number of feedback records included in the summary.
Supporting evidence from the feedback assessment.
Assessment confidence; empty when no feedback exists.