A sentence fragment is an incomplete grammatical sequence that still communicates part of a user's meaning. In chat, a rushed or frustrated customer may type “Forgot password” instead of a complete sentence, so training data should represent both forms. section 7.2.2
From complete utterances to fragments
Complete utterances include “I forgot my password,” “Can you help me log in?” and “My account is locked.” Equivalent fragments include “Forgot password,” “Unable to login,” “Account locked out,” and “Need help resetting password.” section 7.2.2
Prompting an LLM to generate fragments may fail when the prompt only requests utterances. Replacing “utterances” with “fragments” and supplying “Forgot password” as one example gives the model a concrete pattern to follow. section 7.2.2
Use sentence fragments to improve intent-data variety:
- Include fragments alongside statements, questions, commands, and other grammatical structures. section 7.2.2
- Use one-shot learning when the model does not follow the requested form; one example can specify the desired output more reliably than revised instructions alone. section 7.2.2
- Add context when generating related vocabulary, because generic synonyms may not fit a login or password-support conversation. section 7.2.1
Listing 7.8 Generating sentence fragment utterances
You are a consumer contacting an online retailer via their chat service. Generate a numbered list of example fragments a #1 Consumer might start conversation with if they #1 couldn't log in. Use a variety of nouns and verbs #1 related to logging in, passwords, and accounts. Use #1 sentence fragments only. #1 #1 List of 10 sentence fragments #1 1. Forgot password #2 2. Unable to login #3 3. Account locked out #3 4. Need help resetting password #3 5. Can't remember email address #3 6. Email is not working #3 7. Unable to change password #3 8. Unable to access account #3 9. Unable to create new account #3 10. Unable to delete old account #3
Inspect a complete prompt and generated list for login-related sentence fragments. section 7.2.2
Listing 7.9 Using one-shot learning for multiple grammatical structures
You are a consumer contacting an online retailer via #1 their chat service. #1 Generate phrases a user might use to find out where #2 stores are located. Create phrases for each of the #2 following grammatical types. #2 Direct Question: Where are you located? #2 Indirect Question: Can you tell me how to find your #2 stores? #2 Fragment: Store location #2 Command: Give me driving directions #2 Generate phrases a user might use when they need to #3 reset their password. #3 Create phrases for each of the following grammatical #3 types. #3 Direct Question: I forgot my password. #4 Indirect Question: How can I reset my password? #4 Fragment: Password reset #4 Command: Send me a password reset link #4
Compare fragments with direct questions, indirect questions, and commands across store-location and password-reset intents. section 7.2.2
