Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

Summarize feedback

Returns a generated feedback summary, classification, rating metrics, evidence, and confidence for a book.

Reviews
GET/api/v1/feedbacks/{id}/summarize

SummarizeFeedback 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

PropertyValue
Bounded ContextReviews
Owner ServiceRating 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 / FormatHTTP GET, application/json response
Gateway EndpointGET /rating/api/v1/feedbacks/{id}/summarize (service path /api/v1/feedbacks/{id}/summarize)
Authentication & AuthorizationMicrosoft Entra ID JWT required
Idempotency / ConcurrencyRead-only and naturally idempotent
Rate Limit / CachingGlobal 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 Version1.0.0 (ApiVersions.V1)
Note

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

NameTypeRequiredConstraintsDescription
idstring (uuid)YesValid UUIDUnique 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.

NameTypeRequiredConstraintsDescription
summarystringYesNon-nullGenerated narrative summary of customer feedback, or "No feedback found for this book." when reviewCount is 0
classificationstringNoEnum: NoData, Bad, Good, TopRatedApplication-derived classification computed by deterministic business rules
averageRatingnumber | nullNodouble or nullArithmetic mean rating across included feedback records (null when reviewCount is 0)
reviewCountintegerNoint32Number of feedback records included in the summary (0 when unreviewed)
evidencestringNo—Supporting evidence produced by the quality assessment step (empty string when reviewCount is 0)
confidencestringNoFree-form stringConfidence 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 NoData when fewer than 3 reviews exist (or average is invalid), Bad when average < 3.5 or a dominant negative pattern is found, TopRated at average >= 4.5 with 50+ reviews or >= 4.0 with 200+ reviews, and Good otherwise.
  • Tiered caching: Caches non-empty summaries for 6 hours and empty (NoData) results for 1 minute; invalidated on feedback mutations.

Error Responses

Status / CodeConditionClient Recovery Action
401 UnauthorizedMissing, expired, or invalid Entra ID bearer tokenRe-authenticate and retry
403 ForbiddenAuthenticated principal lacks Rating API authorizationRequest a token with the required Rating API scopes
404 Not FoundTarget resource or summary could not be foundSurface an unavailable/not-found state; do not treat as NoData
429 Too Many RequestsRate limit quota exceeded (Retry-After header included)Wait for the Retry-After duration before retrying
500 Internal Server ErrorDownstream 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 failureRetry with exponential backoff; do not fall back to NoData
  • 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

6 properties

Generated summary of feedback for a book.

summarystring
required

Generated summary of the book's feedback.

classificationstring

Application-derived feedback classification.

Allowed values: NoData Bad Good TopRated
averageRatingnumber | null<double>

Arithmetic mean rating; null when no feedback exists.

reviewCountinteger<int32>

Number of feedback records included in the summary.

evidencestring

Supporting evidence from the feedback assessment.

confidencestring

Assessment confidence; empty when no feedback exists.