Skill 1.3.4
Enhance input data quality to improve FM response quality and consistency (for example, by using Amazon Bedrock to reformat text, Amazon Comprehend to extract entities, Lambda functions to normalize data)
Key Concepts
A Lambda function can normalise inputs before they reach a prompt: trim whitespace and markup, standardise dates, units and currencies, correct encoding, remove boilerplate such as email signatures and enforce length limits. Amazon Comprehend extracts entities (people, organisations, dates, quantities), key phrases, language and sentiment, which can be added to the prompt as structured context or stored as metadata.
A small, inexpensive Bedrock model can reformat messy text, such as converting a rambling customer email into a structured summary with fields, before a larger model reasons over it. Rewriting user questions to be self-contained (resolving pronouns from earlier turns) improves both retrieval and generation.