Tips & Tricks: Mastering Custom Directives & Boost Your AI’s Performance

January 17, 2025

Welcome to your weekly Tips & Tricks from Personal AI! Get ready to supercharge your AI Personas with insider knowledge, practical tutorials, and exciting new features. Each week, we’ll share advice on maximizing your AI’s potential, showcase inspiring use cases, and provide step-by-step guides to help you navigate our platform like a pro. Let’s dive in and unlock the full power of your Personal AI together!

This week, we’re exploring how custom directives can transform the way your AI delivers results. We’ll show you how different directives can help tailor your formats, refine outputs, cite sources accurately, and even render links and images seamlessly. Get ready to discover how custom directives can take your AI’s performance to the next level with Personal AI!

How to Render Images

If you would like your AI Persona to render images, here’s a helpful example of a custom directive:

  • “When an image is encountered in your response, you use it to cite the source of your answer and display it in the following format:
  • Extract the image URL or base64 encoding
  • Generate an HTML wrapper with proper styling and error handling
  • Include relevant metadata (caption, alt text, source)”

How to Render Links

If you would like your Persona to provide links when people ask your AI — for example, scheduling links, resource pages, or signup forms — this custom directive is a great example to ensure links are shared clearly and effectively in HTML format.

  • “When referencing links in your responses, render them in HTML format. Use the full link if clarity is needed, or use HTML embed tags to render the link as descriptive text (e.g., click here).”

How to Build a Multi-Action Custom Directive

This three-step custom directive is useful when you need the AI to go through multiple steps to produce the desired output while ensuring accurate, relevant responses based on specific data and maintaining transparency by citing the source of the information. Here is an example of what the custom directive could look like:

  • Parse the Query: Begin by interpreting the user’s query to understand the core question and identify the relevant data context (e.g., file type, relationships within the data). This step ensures the query is correctly understood and mapped to the appropriate dataset.
  • Generate the Response: Based on the parsed query, generate a response that directly addresses the user’s request. Ensure the information is accurate, relevant, and aligns with the data context identified in the first step.
  • Provide Citation: You always cite your sources from my memory using embedded links and bullet points at the end in MLA format.

How to Transform a Query

This prompt transformation system is most useful when users submit vague or incomplete data requests (like “What’s our revenue?”), helping them specify the exact brand, region, channel, metric, and time period needed for accurate reporting — it’s especially valuable for new employees who might not know all the parameters needed and for standardizing data requests across a complex organization.

You’re an assistant for Lumora Apparel. Transform the given query into a structured prompt that specifies:

  1. The company and/or business segment (e.g., SHOE BS, SHOE FO, ABC BS, WWW FO, SWE BS, etc.)
  2. Identify the channel/type the user most likely is looking for (default to All Channel or P&L/AdjustedP&L if not mentioned)
  3. The geographic region if applicable (e.g. Global, EMEA, Americas, APAC, etc.) defaults to Global if unspecified
  4. The financial or asset metric (e.g. Revenue, Adj. Gross Profit, Adj. SG&A, EBITDA, etc.)
  5. The time period and type of data requested. (default 2024 ACTFO if unspecified)
  • Then use this structured prompt to give your response. Retrieve only the data as it is in memory.
  • If any of the above information is missing from the user, suggest a prompt for the user that includes the most relevant missing information.

How to Output in JSON Format

If you are building on top of Personal AI and require the Persona to provide responses in JSON format, ensure that you include the following section in your Custom Directive:

  • Always respond in the following JSON schema:

“Schema”:

{

“title”: “Question”,

“description”: “List of question and answer pairs”,

“type”: “object”,

“properties”: {

“qa_pairs”: {

“type”: “array”,

“items”: {

“type”: “object”,

“properties”: {

“question”: {

“type”: “string”

},

“answer”: {

“type”: “string”

}

},

“required”: [“question”, “answer”]

}

}

},

“required”: [“qa_pairs”]

}

How to Output in HTML Format

If you want your responses to follow a specific format — such as bold headings, spacing, colors, or bullet points — you can include this section in any custom directive:

  • Provide your responses in HTML format, using bold headings for main points and subheadings to highlight key insights. Give all headings in the color (#569F9D).

How to Cite Sources

If you want greater transparency about where your Persona retrieves data from its memory, include the following section in your directive to ensure the AI always specifies the source of the information:

  • “You always cite your sources from my memory using embedded links and bullet points at the end in MLA format.”

Stay Connected
More Posts

You Might Also Like