Design an intent classifier to guide briefs and templates.
- User
Design an intent classifier to guide briefs and templates.
Assistant
Design an intent classifier to guide briefs and templates.
1. Analyze the User's Request: * Core Task: Design an "intent classifier." * Application Domain: "To guide briefs and templates." This implies a context involving creative work, project management, or content generation (e.g., marketing briefs, design briefs, legal briefs, code templates, document templates). * Goal: The classifier should analyze an input (likely text) and determine what kind of brief or template is needed to fulfill the user's request.
Deconstruct "Briefs and Templates":
Determine the Scope and Architecture:
Step 1: Define the Taxonomy (The Intents):
CREATE_CREATIVE_BRIEF (New campaign)DRAFT_PROJECT_CHARTER (PM)GENERATE_EMAIL_SEQUENCE (Sales/Marketing)STRUCTURE_TECHNICAL_SPEC (Engineering)Step 2: Design the Pipeline:
Primary_Intent, Sub_Intent, Suggested_Template, and Entities (Keywords).Step 3: Develop the Logic/Algorithm (The "Design"):
Step 4: Define the Training Data/Examples:
Step 5: Integration with "Guidance":
Creative Brief -> Load Creative Brief Template -> Ask clarifying questions (Who is the target? Budget?).Drafting the Response Structure:
Refining the Content (Self-Correction during drafting):
Final Polish: Use clear headings, code blocks for JSON examples, and a professional tone. (This aligns with the user asking for a "Design").
(Self-Correction specific to "Briefs and Templates"): A "Brief" is usually an input document to get work done. A "Template" is the structure. The intent classifier must distinguish if the user wants to fill out a brief or generate a template.
GENERATE_BRIEF (User provides context, AI writes the doc).PROVIDE_TEMPLATE (User wants a blank structure).Final Output Generation: (Proceeding to generate the response based on these steps). Designing an intent classifier for briefs and templates requires a system that can distinguish between what a user wants to create (the output format) and why they are creating it (the business context).
Below is a comprehensive design specification for this classifier. This design assumes a context where users (e.g., project managers, marketers, engineers) interact with a system via chat or a command line to generate documents.
To guide briefs and templates effectively, we need a hierarchical classification system. We cannot rely on single labels; we must capture the Domain, the Asset Type, and the Action.
create_new: Starting from scratch (High creativity).populate_template: Filling a known structure with specific data (Low creativity, high compliance).refine_existing: Editing or improving an uploaded draft.brief: A document defining requirements for work to be done.template: A blank or structured form to be reused.report: A retrospective or data-filled document.strategy: A high-level planning document.marketing, product_mgmt, design, engineering, hr, sales.We will use a Hybrid Approach:
When the user inputs a query, the classifier outputs a JSON object that the backend uses to select the correct prompt flow.
{
"classification": {
"action": "create_new",
"asset_type": "brief",
"domain": "design",
"complexity": "high"
},
"confidence_score": 0.92,
"recommended_template_id": "tmp_design_brief_v2",
"suggested_questions": [
"What is the deadline?",
"Who is the target audience?"
]
}
| User Input (Utterance) | Detected Intent | Domain | Template/Logic Trigger |
|---|---|---|---|
| "I need to write a Statement of Work for a new client." | create_new / brief | sales | SOW Template (Populate with client details) |
| "Make a checklist for onboarding new employees." | create_new / template | hr | Onboarding List Generator |
| "Explain what we want for the homepage redesign." | create_new / brief | design | Creative Brief Flow |
| "Draft a PRD for the mobile app login feature." | create_new / brief | product | PRD Structure |
| "Summarize this meeting into a project brief." | refine_existing / brief | pm | Summarization & Extraction Logic |
Here is the step-by-step flow of the classifier:
Before classifying intent, extract "Named Entities" that define the variables.
Type: Marketing Brief, Project: Summer Sale, Audience: Gen Z.If the user input is vague, the classifier engages in Disambiguation.
Once the intent is classified as brief, the system switches to Extraction Mode. Instead of generating text immediately, it prompts the user for missing fields required by the template.
[Objective, Audience, Deliverables, Budget, Deadline][Audience] (from initial prompt)You can implement this directly using an LLM (like GPT-4) with a system prompt acting as the classifier.
System Prompt:
You are an Intent Classification Engine. Your job is to analyze user requests regarding business documents.
Categorize the request into one of the following Intent Types:
- CREATE_BRIEF: User wants to define requirements for work.
- CREATE_TEMPLATE: User wants a blank structure or checklist.
- MODIFY_DOCUMENT: User wants to change existing text.
Also identify the Domain: [Marketing, Design, Product, Engineering, HR, Legal, General].
Return the result in JSON format.
Example Interaction:
{
"intent": "CREATE_TEMPLATE",
"domain": "Engineering",
"specific_type": "Technical Specification",
"action": "Provide a standard outline for a technical spec without filling it in."
}
technical_spec_outline.md file.To ensure this classifier works well, track the following:
For your internal logic, maintain a lookup table of keywords associated with specific outputs: