GENERATIVE-AI-ENGINEER-ASSOCIATE · Question #19
A Generative AI Engineer is creating an LLM system that will retrieve news articles from the year 1918 and related to a user's query and summarize them. The engineer has noticed that the summaries…
The correct answer is D. Provide few shot examples of desired output format to the system and/or user prompt. The problem is an output formatting issue - the LLM is producing correct content but appending unwanted meta-commentary. The most direct and reliable fix is few-shot prompting (option D): providing examples of ideal outputs (summary only, no explanation) teaches the model…
Question
A Generative AI Engineer is creating an LLM system that will retrieve news articles from the year 1918 and related to a user's query and summarize them. The engineer has noticed that the summaries are generated well but often also include an explanation of how the summary was generated, which is undesirable. Which change could the Generative AI Engineer perform to mitigate this issue?
Options
- ASplit the LLM output by newline characters to truncate away the summarization explanation.
- BTune the chunk size of news articles or experiment with different embedding models.
- CRevisit their document ingestion logic, ensuring that the news articles are being ingested properly.
- DProvide few shot examples of desired output format to the system and/or user prompt.
How the community answered
(33 responses)- A6% (2)
- B3% (1)
- C15% (5)
- D76% (25)
Explanation
The problem is an output formatting issue - the LLM is producing correct content but appending unwanted meta-commentary. The most direct and reliable fix is few-shot prompting (option D): providing examples of ideal outputs (summary only, no explanation) teaches the model exactly what format is expected. Option A (splitting on newlines) is a brittle post-processing hack that will break on valid multi-line summaries. Option B (changing chunk size or embedding models) addresses retrieval quality, not output format. Option C (checking ingestion logic) addresses document content, not the LLM's response style.
Topics
Community Discussion
No community discussion yet for this question.