Please review Overview: How to show content on screen before proceeding to ensure this is the best approach for you.
When using generative content provided by a Large Language Model we recommend using the Content Card Skill to show content on screen. The Content Card Skill will look for URLs included in the response from your conversation provider / LLM, strip the URLs out of the response, and generate Content Cards using the URLs.
This approach is good for handling dynamic content, however it limits the types of content you can display to Image, Video, and External Link Content Cards. There is limited support for markdown tables in a Markdown Content Card however this rarely works with streamed responses from LLMs.
If you need additional Content Card types or greater control over what Content Cards are displayed and when, then you may want to explore conversation platforms that let you write structured conversations.
How to use the Content Card Skill with Generative Conversation
Step 1: Add the Content Card Skill in your Studio Project
- In your Studio project, navigate to the Knowledge section. Click the Add Skill button.
- Click on the Content Cards Skill tile, then click Add Skill
Step 2: Add an Additional Prompt telling GPT how to use the Content Card Skill
- In your Studio project, navigate to the Knowledge section. Click the Edit Conversation button.
- Under Additional Prompting copy and paste the following instruction
You can also display images, videos and external links in your response. This will get stripped out and displayed as an on screen card, so either provide the full raw url without referring to it or frame your response as something like "use the link on screen https.... to log in" etc. When a url follows a relevant piece of information in this prompt or Additional Context you can copy the full raw url into your response verbatim.
This can be included with other Additional Prompting.
You may need to modify this prompt, or adjust your other prompts to ensure this works.
Your Additional Prompting should look like:
- If you'd like to only provide the URLs that you specify then you can include an additional instruction like:
Only provide urls for images, videos, or external links if they're included in this prompt or Additional Context.
Step 3: Add Additional Prompts or Knowledge Snippets with specific URLs
- You can provide specific URLs for GPT to use. Where you add this information affects when GPT can use it:
- Additional Prompting
- URLs added here will always be available to GPT as part of the system prompt. Use this option for URLs which GPT always needs to know, or needs to proactively offer, or which may be referenced indirectly.
- An example of this prompting might be:
The Soul Machines website is [Soul Machines](https://www.soulmachines.com/) This video shows Soul Machines' Experiential AI: https://youtu.be/JekXnK8zgAw?si=2TSUb3zwmRfevv30 This is image of my cat: https://placecats.com/500/500
- Knowledge Snippets
- URLs added here will only be available to GPT when the Knowledge Snippet its part of scores highly enough to be provided to GPT. This means that GPT will only have these URLs if the user says something relevant to them, and GPT will only have the URL for a single Conversation Turn at a time. Use this potion for URLs which GPT doesn't need to know about frequently, and which the User would ask for specifically.
- An example of these Knowledge Snippets might be:
Whats your company website? The website for Soul Machines is [Soul Machines](https://www.soulmachines.com) When writing a custom Skill you can define the UI seen in the project using the Skill Definition. [Lifecycle Hooks](https://docs.soulmachines.com/skills-api/guides/lifecycle-hooks/#overview)
- Additional Prompting
Step 4: Deploy and test your Project
- Click Apply Changes.
- Content Cards aren't shown in the Studio Preview Window, so click Deploy Now on the top right of the page.
- Click Open in new tab.
- When speaking to your Digital Person test when content cards are or aren't used and adjust the Additional Prompt and Knowledge Snippets accordingly. Using the example URLs above you might ask:
- "What's the Soul Machines website?" - This is an explicit question and should work since the url is in the prompt and has a clear snippet match.
- "Do you have a cat?" then "Can you show me it?" - This is a contextual question and should work since the url is in the prompt.
- "What's a Skill?" then "Can you link me to it?" - This is a contextual question and shouldn't work since the url is in a snippet but won't match to the question "can you link me to it". It should work with a more explicit question like "can you link me to the Skills documentation"
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article