---
title: Handle book feedback in conversation
summary: Set expectations when a customer shares an opinion or feedback about a book with an agent.
version: 1.0.0
type: guides
order: 4
badges:
  - content: Guide
    backgroundColor: teal
    textColor: teal
---

**Audience & Outcome:** This guide is for AI engineers and product owners working on [[service|chat-api]] and Reviews integration. You will learn how conversational feedback is kept strictly separate from authoritative [[entity|feedback]] records and Catalog rating summaries.

When a customer shares praise, criticism, or an opinion about a book during chat, [[agent|book-agent]] responds empathetically inside the conversation without creating, modifying, or deleting any official review record. Authoritative [[entity|feedback]] records live exclusively in [[service|rating-api]], and BookWorm keeps conversational discussion strictly separate from persisted review writes.

## Context and motivation

Customers naturally blend three different intents in bookstore conversations:

1. **Sharing an informal opinion** (_"I loved the pacing of Dune, give me something similar"_).
2. **Asking for an analysis of existing reviews** (_"What do readers say about Dune?"_).
3. **Submitting, editing, or deleting a public review** that affects a book's rating summary.

Treating informal chat comments as official reviews creates silent data-integrity bugs and misleads customers into believing a casual message updated a book's public rating. BookWorm separates empathetic conversational handling, read-only review summarization, and authoritative review persistence into three distinct paths.

## How it works

The visual below contrasts the two read-only Conversational paths against the separate authoritative Reviews write path through [[service|rating-api]] and Kafka.

<MermaidFileLoader file="mermaids/04-handle-book-feedback-diagram-1.mmd" />

### Four architectural invariants

:::warning
[[service|chat-api]] has no Kafka producer, no [[container|rating-database]] connection, and no review write tools. [[agent|book-agent]] must never claim that a chat comment was saved, published, or used to update a book's rating.
:::

- **Inline sentiment inference with no Sentiment Agent:** [[agent|book-agent]] infers customer sentiment from emotional book feedback, acknowledges it naturally, and uses it to shape follow-up recommendations without exposing raw sentiment labels unless asked. BookWorm has no separate sentiment agent or microservice.
- **Zero write path from Chat to Reviews:** Governance rules permit [[agent|book-agent]] to call `handoff_to_rating` for read-only analysis only, never to create or delete [[entity|feedback]] records.
- **ID-gated read-only review summarization:** When a customer asks to summarize reviews without providing a book ID, the decision router sends the request to [[agent|book-agent]]. It resolves the exact catalog ID via [[service|mcp-server]] (`search_catalog`) and hands off to [[agent|rating-agent]] over A2A gRPC. [[agent|rating-agent]] is terminal and read-only.
- **Formal reviews stay in Reviews and project asynchronously:** Customers who want to submit or remove an official review use the Storefront review flow backed by [[service|rating-api]], which persists [[entity|feedback]] in [[container|rating-database]] and publishes [[event|FeedbackCreatedIntegrationEvent]] or [[event|FeedbackDeletedIntegrationEvent]] so [[service|catalog-api]] updates its derived rating summary.

<AccordionGroup>
<Accordion title="Design trade-offs and alternatives considered">

| Decision                                                                     | Benefits                                                                                             | Costs and limits                                                                  |
| :--------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------- |
| **Keep chat feedback non-persistent and read-only**                          | Prevents accidental review publication and preserves auditability in Reviews                         | Customers wishing to publish an opinion must submit a formal review in Storefront |
| **Handle emotional sentiment inline in [[agent\|book-agent]]**               | Avoids the latency and operational cost of a dedicated sentiment agent                               | Sentiment inference is scoped to the conversational turn rather than persisted    |
| **Require a resolved single book ID before [[agent\|rating-agent]] handoff** | Keeps [[agent\|rating-agent]] focused strictly on review analysis without duplicating catalog search | Title-only review questions take an extra catalog-resolution step before handoff  |

**Rejected alternatives:**

- **Adding a dedicated Sentiment Agent:** Foundation models invoked by [[agent|book-agent]] already infer conversational sentiment reliably inline.
- **Adding a review write tool to [[agent|book-agent]]:** Persisting public reviews requires explicit customer intent, structured validation, and authenticated Reviews ownership.

</Accordion>
</AccordionGroup>

## Related documentation

- [[flow|agent-orchestration]] — How `Microsoft-Decision-1` selects specialists and coordinates handoffs.
- [[flow|feedback-publication]] — How formal reviews persist in [[service|rating-api]] and project to [[service|catalog-api]].
- [[adr|adr-004-read-only-governed-feedback-summarization]] — Decision record for read-only, governed feedback summarization.
