An AI model cannot reliably follow 'apply only when' instructions. A developer must create two separate workflows. One workflow is for in-domain content. The other workflow is for out-of-domain content.
By Pawan Nayar · from the LLOS AI Learning record
An AI model cannot reliably follow 'apply only when' instructions.
A developer must create two separate workflows. One workflow is for in-domain content. The other workflow is for out-of-domain content.
Soft instructions like 'apply only when...' are not reliable for an AI model. The AI model often fails to understand these conditions. A developer should build two distinct prompts instead. Each prompt handles a different content domain. One prompt is for content that matches the AI model's training domain. This prompt uses the AI model's usual style and vocabulary. The other prompt is for content outside the AI model's training domain. This prompt includes a strict ban on specific words and contexts. The developer can check the content's domain by comparing its words to a list of 'signature words'. These are words common in the AI model's training domain. If the content shares many signature words, it is in-domain. If not, it is out-of-domain. Some words are common across many domains. These 'universal' words should not be banned. A developer can filter out words that appear in more than 10% of different content types. This prevents banning words that are too general.
A developer wants an AI model to write poetry. The AI model is trained on Rumi's poems. For new poems in Rumi's style, the developer uses a prompt that allows Rumi's signature words. For poems not in Rumi's style, the developer uses a different prompt. This second prompt bans Rumi's specific vocabulary. This way, the AI model does not accidentally use Rumi's words when writing about a different poet's style.
Resolved from this lesson's own record — real definitions, not invented for this page.
More from the same record, pulled by shared topic — not written new for this page.
An AI model's 'voice' should only control the writing style, like sentence structure and rhythm. It should not control the specific words or content.
A developer should define the full range of what an AI model can do. These are like the edges of a playing field.
A developer should provide example SVG code to the AI model. This helps the AI model understand the exact visual style.
A developer can send several different requests to an AI model at the same time. Each request should ask for a different style or type of answer.
An AI model cannot reliably follow 'apply only when' instructions. A developer must create two separate workflows. One workflow is for in-domain content. The other workflow is for out-of-domain content.