Skip to main content
Manage Output Structure

Control content generated from Smart Instructions.

Updated over 3 weeks ago

In addition to telling Driver what content you want it to generate from your Smart Instruction prompts, you can optionally include a description of how you want that content structured. This includes support for paragraphs, tables, lists, diagrams, and code blocks.

There are two methods for specifying the structure. First, you can select one of the structure types directly from the bottom of the Smart Instruction. This will force Driver to produce nothing more than the selected structure. The second method is to add a description of the content structure directly in your Smart Instruction prompts.

One important thing to keep in mind is that there is no special syntax or convention to follow when calling out the content structure you want. Simply describe what you expect to see and Driver will do the rest.



Letting Driver Generate Any Content

  1. Ensure + Any is the selected content structure. This is the default for all Smart Instructions.

  2. Write a Smart Instruction prompt without specifying any details about the expected structure of the generated content.


3. Review the generated content. Refine your prompt and select + Rewrite, or select + Accept to insert it into your document.

Good to Know: Specifying the content structure is optional. If you omit a description of the desired structure, Driver will decide for you based on the nature of the prompt and references as long as you have + Any selected.



Paragraph

1. Specify that you want the generated content in the form of a paragraph by selecting the + Text button in the prompt UI:


2. Review the generated content. Refine your prompt and select + Rewrite, or select + Accept to insert it into your document.

Good to Know: You may notice that when left unspecified, Driver may generate content with a rich structure and combination of formatting options. At times, it can be helpful to avoid this structure and constrain the output to a paragraph or two. Feel free to request a single paragraph or a specific number or leave it open-ended.




Table

1. Specify that you want the generated content in the form of a table by selecting the + Table button in the prompt UI. You can include additional details for column/header or other content formatting in your initial prompt, or refine it after Driver generates its first pass.


2. To specify the details of your table further, add details for column/header or other content formatting in the Smart Instruction prompt and hit the + Rewrite function.

Good to Know: Tables are a great way to display a lot of similar information in a way that is easy to digest visually. You can tell Driver exactly what you want to see in the table columns or let it choose for you. If you specify the columns to show in the table, Driver can typically infer what information the columns should include. For more control, you can also describe each column in addition to specifying the names.



Diagram

Sequence Diagram

1. Specify that you want the generated content in the form of a sequence diagram by selecting the + Diagram button in the prompt UI and specifying the type of diagram in your prompt's text.


2. Review the generated content. Refine your prompt and select + Rewrite, or select + Accept to insert it into your document.

Good to Know: When requesting a diagram, Driver actually generates a code block with Mermaid JS code that describes the diagram. By default, the code block will be in "Split" mode, showing this code and a preview of the diagram.

  1. Select "Preview" from the drop-down menu to show only the diagram.



Block Diagram

1. Specify that you want the generated content in the form of a block diagram by selecting the + Diagram button in the bottom of the prompt UI and specifying the type of diagram in your prompt's text.


2. Review the generated content. Refine your prompt with and select + Rewrite, or select + Accept to insert it into your document.

Good to Know: Beyond block and sequence diagrams, explore creating flow charts, class diagrams, and state diagrams to visually describe important concepts in your codebase. Also note that you are free to manually edit the Mermaid JS code that Driver generates. The Mermaid JS syntax is documented here: https://mermaid.js.org/intro/syntax-reference.html



Diagram Split/Preview/Code Modes

By default, Driver shows you both a Mermaid JS diagram and the corresponding code in the same generated content view. You can switch between Split, Code only, and Preview only modes by selecting the mode button in the top-right of the UI:



Diagram Fullscreen Mode

To view any generated diagram in a bigger viewport, select the + Fullscreen button in the top-right of the generated content view.

Diagram Copy

To copy the contents of a generated diagram, select the + Copy icon button in the top-right of the generated content view.



Lists

Ordered or Unordered Lists

1. Specify that you want the generated content in the form of an ordered or unordered list by selecting the + List button in the bottom of the prompt UI. Specify the type of list you want in your prompt.


2. Review the generated content. Refine your prompt with and select + Rewrite, or select + Accept to insert it into your document.


Changing the List Type

1. To change the type of list to an unordered list refine your prompt and hit + Rewrite.


2. Review the generated content. Refine your prompt with and select + Rewrite, or select + Accept to insert it into your document.



Multi-level List

1. To expand the structure of a list, refine your prompt. Specify that you want the generated content in the form of a two-level list and select the + Rewrite function.


2. Review the generated content. Refine your prompt with and select + Rewrite, or select + Accept to insert it into your document.

Good to Know: Experiment with different combinations of list options and types beyond the examples shown above or simply ask for a list and let Driver determine the structure for you.



Code Block

1. Specify that you want the generated content in the form of a + code block.


2. Review the generated content. Refine your prompt with and select + Rewrite, or select + Accept to insert it into your document.

Did this answer your question?