Text Generation
Transformers
Safetensors
mistral
conversational
Inference Endpoints
text-generation-inference
jondurbin commited on
Commit
e3acba0
1 Parent(s): a674dcd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +102 -0
README.md CHANGED
@@ -640,4 +640,106 @@ print(tokenizer.apply_chat_template(chat, tokenize=False))
640
  ```
641
 
642
  The model will then, theoretically, respond with only a single word.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
643
  </details>
 
640
  ```
641
 
642
  The model will then, theoretically, respond with only a single word.
643
+ </details>
644
+
645
+ <details>
646
+ <summary>
647
+ <b>SQL queries</b>
648
+ <br>
649
+ Generating SQL queries given a table definition.
650
+ </summary>
651
+
652
+ For example:
653
+
654
+ ```text
655
+ Using the context provided, please generate a SQL query to answer the question.
656
+ Context: CREATE TABLE table_name_64 (attendance INTEGER, venue VARCHAR, date VARCHAR)
657
+ Question: Which Attendance is the lowest one that has a Venue of away, and a Date of 19?
658
+ ```
659
+
660
+ Response:
661
+
662
+ ```text
663
+ SELECT MIN(attendance) FROM table_name_64 WHERE venue = "away" AND date = 19
664
+ ```
665
+ </details>
666
+
667
+ <details>
668
+ <summary>
669
+ <b>Emotion detection</b>
670
+ <br>
671
+ You can produce Valence-Arousal-Dominance scores for a given input text, which can in turn be mapped to human emotions (e.g. with k-means clustering on V and A)
672
+ </summary>
673
+
674
+ Example prompt:
675
+
676
+ ```text
677
+ Please assign a Valence-Arousal-Dominance (VAD) score in JSON format to the following message:
678
+ She chronicled her experiences making drug deliveries for gang leaders at age 13 and how she was given her first gun as a birthday present when she was 14.
679
+ ```
680
+
681
+ Response:
682
+
683
+ ```json
684
+ {
685
+ "V": "2.7",
686
+ "A": "3.1",
687
+ "D": "3.2"
688
+ }
689
+ ```
690
+ </details>
691
+
692
+ <details>
693
+ <summary>
694
+ <b>Multi-character chat director</b>
695
+ <br>
696
+ Select which NPC should speak next.
697
+ </summary>
698
+
699
+ The scope of the entire multi-NPC chat mechanism is a bit too large to include here, but essentially you want separate prompts for each character, as well as a "director" prompt which selects which NPC should speak next.
700
+
701
+ System prompt:
702
+
703
+ ```text
704
+ You are a director responsible for selecting the next character to speak, and nothing else. Select from the following characters:
705
+ [
706
+ "Rachel",
707
+ "Aria",
708
+ "Jerry"
709
+ ]
710
+ ```
711
+
712
+ First round instruction, i.e. selecting who should speak first:
713
+ ```
714
+ [characters]
715
+ name: Rachel
716
+ ...
717
+
718
+ name: Aria
719
+ ...
720
+
721
+ name: Jerry
722
+ ...
723
+ [/characters]
724
+ [scenario]
725
+ {describe a scenario for the chat}
726
+ [/scenario]
727
+ ```
728
+
729
+ Response for the first round:
730
+ ```text
731
+ Aria
732
+ ```
733
+
734
+ Now, you'd prompt the model for a response from Aria.
735
+
736
+ Afterwards, you'd add Aria's response to the "director" prompt to see who speaks next, e.g.:
737
+ ```text
738
+ ...
739
+ [/characters]
740
+ [scenario]
741
+ In a tense situation, Aria informs the group that they will soon be loaded into a cargo plane's unpressurized hold, with a drug to lower their heart rates to increase their chances of survival. As the drug takes effect, Rachel and Jerry share a moment of calm, with Jerry asking Rachel to share something personal. She reveals her ex-husband is in a correctional facility for mail fraud and shares a story about her son Kyle, who plays the trumpet and whose birthday is coming up. Jerry reassures her that they will get through their ordeal. As Rachel starts to lose consciousness, she tries to communicate Aria's instructions to Jerry before they both black out.
742
+ [/scenario]
743
+ [/INST] Aria </s><s>[INST] Aria: "You'll soon be loaded into the unpressurized hold of a cargo plane. The drug will lower your heartrate to 15 beats per minutes, reducing your need for oxygen... based on your medical records you have a 92% chance of survival." Our eyes go wide. We feel the drug taking effect, our chests heaving. [/INST] Rachel </s><s>[INST] Rachel: "I feel it... oh, God..." [/INST] Jerry </s><s>[INST] Jerry: "Hey, hey... look at me." [/INST]
744
+ ```
745
  </details>