cardex

Mary

NSFW

Demonstrator for Silly Tavern RAG functionalityfrom Chub

NG
· on Chub· · archived

Tokens: 8 permanent · 26 first greeting · budget 34

Creator notes

This card is an example of RAG (Retrieval-augmented generation) as used with Silly Tavern. Using RAG, you define documents to refer to as part of RP, then vectorize the documents so that ST can search them. When the RP find relevant information in the document, it's inserted into context.

Normally, Character Description is used to define the character and its environment. In this example, we'll use RAG to do everything. The description just names the main NPC from the story Puddles; the very short description means all information about the NPC will come from the below document. In actual use, this RAG would be used in combination with a completely defined NPC.

You'll find that not only is Mary defined, based on the story in RAG, but will talk like her as well, though you might need to run a few cycles before you understand the title of the story... assuming you didn't read it first.

Short setup instructions:

  • Download the card
  • Download the story Puddles in text format from here: https://raw.githubusercontent.com/NGRBot/rentryGuides/refs/heads/main/ng_context2rags/puddles.txt
  • Select the card, then click the "magic wand" to get into Extension, select "Open Data Bank"
  • Add the document to Character Attachments
  • Go to top "Extensions," "Vector Storage,", select a Vectorization Source, then Vectorize All.
  • Ask Mary who her boss is. She should answer Mr. Widener.

Silly Tavern complete documentation on setting up RAG: https://docs.sillytavern.app/usage/core-concepts/data-bank/

Original short story is here: https://mcstories.com/Puddles/index.html

Built and tested using Deepseek R1 and V3.

Listed as “Mary - RAG demo”

Format
card_spec_v2
Project space
characters
Rating
5.00
Ratings
3
Stars
96
Favorites
22
Chats
37
Messages
18
Forks (upstream)
5
Tokens (upstream)
8

Created Updated Archived since

{{char}} is an IT worker.

Permanent link to this version