---
agentTools:
  projectIndex: https://diffgram.readme.io/llms.txt
---

# Conversational Annotation & LLM (Preview)

[block:api-header]
{
  "title": "Overview"
}
[/block]

Use Diffgram as your UI to display large-language model (LLM) outputs, collect user feedback (such as preferred responses, ratings, and more), and display results back to the user. We are actively collecting feedback on this new area please join our slack channel to discuss your needs.

[block:api-header]
{
  "title": "Importing Conversational Data"
}
[/block]

So far, conversational object can be imported only via SDK. For this, make sure you have diffgram sdk installed, and run text script:

[block:code]
{
  "codes": [
    {
      "code": "from diffgram import Project\nfrom diffgram.file.conversational import Conversational\n\nproject = Project(\n  project_string_id = <Project string id>,\n  client_id = <Client id>,\n  client_secret = <Client secret>\n)\n\nnew_conversational_file = Conversational(project, \"MyNewConversationWithChatGPT6\")\n\nnew_conversational_file.add_message(message_file=\"./message_1.txt\", author=\"Vitalii\", time=\"1:55\", date=\"2023-02-16\")\nnew_conversational_file.add_message(\"./message_2.txt\", \"ChatGPT\", \"2:49\", \"2023-02-16\")\n\n#Author, time and date are optional arguments\nnew_conversational_file.add_message(\"./message_3.txt\", \"Vitalii\")\nnew_conversational_file.add_message(\"./message_4.txt\")\n\nnew_conversational_file.upload()",
      "language": "python"
    }
  ]
}
[/block]

Open Diffgram, go to **Project** -> **Import** to verify that file was successfully imported:

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/1694cab-Screenshot_2023-02-22_at_12.36.46.png",
        "Screenshot 2023-02-22 at 12.36.46.png",
        3024,
        1168,
        "#000000"
      ]
    }
  ]
}
[/block]

[block:api-header]
{
  "title": "Chat metadata"
}
[/block]

Within Diffgram, chat metadata is stored as [attributes](https://diffgram.readme.io/docs/attributes-training-data). On creating a new chat, there will be 3 attributes created on default schema:

* Author - attribute of kind "text"
* Time - attribute of kind "time"
* Date -attribute pf kind "date"

[block:api-header]
{
  "title": "Conversational UI overview"
}
[/block]

In a Diffgram, entire chat is a compound [file](https://diffgram.readme.io/docs/compound-file) and every message is separate text file. When everything is imported - you can annotate chat messages as a [standard text files](https://diffgram.readme.io/docs/text-annotation) (create labels, relations, assign attributes and global attributes)

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/669864b-Screenshot_2023-02-22_at_12.43.07.png",
        "Screenshot 2023-02-22 at 12.43.07.png",
        3024,
        1446,
        "#000000"
      ]
    }
  ]
}
[/block]

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/248c11f-Screenshot_2023-02-22_at_12.53.39.png",
        "Screenshot 2023-02-22 at 12.53.39.png",
        3024,
        1454,
        "#000000"
      ]
    }
  ]
}
[/block]

[block:api-header]
{
  "title": "More Coming Soon"
}
[/block]

This interface is in active development. Contact us about streaming, customization, embedding, and more.