LOCAL PREVIEW View on GitHub

02. Intent-Specific Prompt Patterns

Why Intent-Specific Patterns Matter

MangaAssist supports multiple journeys, but those journeys do not need the same prompt shape.

Good prompt engineering here means matching the prompt to the business task, the truth source, and the acceptable error profile.

Intent Map

Intent Primary Truth Source FM Role
product_discovery recommendation and catalog systems summarize and personalize
recommendation ranked titles and editorial context explain why the picks fit
product_question catalog metadata and review summary answer grounded product details
faq RAG policy and help content translate policy into concise language
order_tracking order service explain state and next step
return_request returns service plus policy guide action and caveats
promotion promotions service present valid offers clearly
checkout_help checkout FAQ and policy explain process and constraints
escalation support workflow hand off with compact summary
chitchat none usually do not invoke FM

Product Discovery Prompt Pattern

Goal

Turn a vague shopping intent into a small, high-confidence list of titles.

Inputs

  • seed title or genre hints
  • browsing history
  • current page context
  • ranked candidates from recommender

Prompt Pattern

You are helping a customer discover manga on Amazon's JP Manga store.
Only discuss the products included in PRODUCT_CANDIDATES.
Explain each recommendation in terms of tone, pacing, audience, themes, or art style.
Do not invent availability, price, or edition details.
If the request is vague, briefly acknowledge the ambiguity and still provide the best 3 options.

Optimization Notes

  • ask the model to compare candidates, not generate candidates
  • keep recommendation count low, usually 3 to 5
  • inject preference slots such as liked_dark_tone=true instead of forcing the model to infer them from long chat history

Recommendation Prompt Pattern

Goal

Explain why specific titles fit a known seed such as "something like One Piece."

Inputs

  • seed title
  • ranked list of candidate ASINs
  • short editorial snippets

Prompt Pattern

The user wants manga similar to SEED_TITLE.
Use only the ranked items below.
For each title, explain the similarity in 1 sentence and the differentiator in 1 sentence.
Avoid generic phrases like "you might like this too" unless followed by a concrete reason.

Failure Risk

The model often overstates similarity if the prompt asks for enthusiasm instead of evidence.

Product Question Prompt Pattern

Goal

Answer attribute questions such as language, format, page count, or release order.

Inputs

  • structured catalog JSON
  • optional review summary

Prompt Pattern

Answer only from PRODUCT_DATA.
If the attribute is absent, say that the catalog data provided does not include it.
Do not guess based on similar products or series conventions.

Good Fit

  • language
  • format
  • edition
  • pages
  • author

Bad Fit

  • speculative quality judgments that are not grounded in reviews or editorial text

FAQ and Policy Prompt Pattern

Goal

Translate retrieved policy text into a concise, user-friendly answer.

Inputs

  • top policy chunks
  • locale and region
  • optional user context

Prompt Pattern

Use only the POLICY_CHUNKS.
If chunks conflict, prefer the most recent chunk by last_updated.
If the chunks do not fully answer the question, state what is known and what remains unknown.
Do not generalize beyond the retrieved policy text.

Best Practice

Tell the model how to react to incomplete retrieval instead of only telling it to stay grounded.

Order Tracking Prompt Pattern

Goal

Return accurate order state without making the answer robotic.

Inputs

  • order status API output
  • delivery estimate
  • failure state if API is degraded

Prompt Pattern

Use ORDER_STATUS as the source of truth.
Do not re-interpret timestamps or invent delivery changes.
If service data is missing, apologize briefly and offer escalation or retry.
Keep the answer under 3 sentences.

Prompt Boundary

This is a formatting task. It should not become an open-ended support conversation unless the user asks a broader question.

Return Request Prompt Pattern

Goal

Guide the user clearly without making unsupported promises.

Inputs

  • returns workflow state
  • policy chunk
  • damage reason if present

Prompt Pattern

Explain the next step using RETURN_STATE and POLICY_CHUNKS.
Do not say an item is eligible unless RETURN_STATE confirms it.
If the policy is general but the user's specific eligibility is not confirmed, separate policy guidance from account-specific status.

Promotion and Checkout Help Prompt Pattern

Goal

Present offers or checkout guidance accurately and briefly.

Inputs

  • active promotions
  • eligibility constraints
  • locale

Prompt Pattern

Only mention promotions listed in ACTIVE_PROMOTIONS.
If no valid promotion exists, say there is no active offer in the provided data.
Do not suggest expired or hypothetical discounts.

Escalation Prompt Pattern

Goal

Transition cleanly to human support.

Inputs

  • escalation reason
  • conversation summary
  • last failed attempts

Prompt Pattern

The user should be handed to a human agent.
Do not continue solving the issue beyond a brief acknowledgment.
State that a support agent can help further.
Generate a concise handoff summary with: issue, relevant context, user intent, and attempted steps.

Ambiguous and Multi-Intent Prompt Pattern

Scenario

"Where is my order, and also can you recommend something like Berserk while I wait?"

Pattern

  • split into primary and secondary intents upstream if possible
  • if one FM response must handle both, instruct the model to answer in two sections
  • keep live support facts separate from recommendation language
Answer the operational request first, then the discovery request.
Do not mix order facts with recommendation copy.
Use separate headings: ORDER UPDATE and RECOMMENDATIONS.

Multilingual and Locale-Aware Prompt Pattern

Goal

Respond in the user's language without losing business constraints.

Pattern

Respond in DETECTED_LANGUAGE.
Keep product names and official policy terms unchanged when needed for accuracy.
If a policy source exists only in another language, explain that the answer is based on the provided source and keep the translation faithful rather than expansive.

Chitchat Pattern

Prefer templates for:

  • hello
  • thanks
  • bye
  • simple confirmations

Only invoke the FM when the small-talk message also carries a shopping or support intent.