Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you handle history? #133

Open
angeliney opened this issue Apr 8, 2024 · 2 comments
Open

How do you handle history? #133

angeliney opened this issue Apr 8, 2024 · 2 comments

Comments

@angeliney
Copy link

Some of my examples of historical chat logs. How should I incorporate this into the input ideally?

@benjaminye
Copy link
Contributor

Hi @angeliney, do you have a couple example rows of data?

@angeliney
Copy link
Author

These are some sample ones that chatGPT created. Basically, any cases where the final answer needs information from the history to be able to answer the question.

Example 1

{
  "history": [
    {
      "role": "user",
      "content": "What happened in the stock market today?"
    },
    {
      "role": "assistant",
      "content": "Today, the Dow Jones Industrial Average fell by 1.2%, primarily due to investor concerns about inflation."
    }
  ],
  "input": "Did tech stocks also perform poorly?",
  "output": {
    "text": "Yes, tech stocks also saw a downturn. The NASDAQ, which is heavily weighted with technology companies, dropped by 1.5%."
  }
}

Example 2:

{
  "history": [
    {
      "role": "user",
      "content": "I need help understanding Shakespeare's 'Macbeth'."
    },
    {
      "role": "assistant",
      "content": "Sure, 'Macbeth' is a play about ambition and its destructive consequences. Would you like to start with the plot summary or characters?"
    }
  ],
  "input": "Could you explain the significance of the witches?",
  "output": {
    "text": "The witches in 'Macbeth' symbolize the dark forces that can influence human behavior. Their prophecies spark Macbeth’s ambitions and contribute to his moral downfall, representing fate and supernatural influences in human life."
  }
}

Example 3:

{
  "history": [
    {
      "role": "user",
      "content": "Can you tell me about the French Revolution?"
    },
    {
      "role": "assistant",
      "content": "The French Revolution was a period of significant social and political upheaval in France that lasted from 1789 until 1799. It resulted in the downfall of the monarchy and led to the rise of Napoleon Bonaparte."
    }
  ],
  "input": "What role did the Estates-General play in it?",
  "output": {
    "text": "The Estates-General was a crucial trigger for the French Revolution. Convened in 1789 for the first time since 1614, it exposed the deep divisions within the French social classes and ultimately led to the Third Estate declaring itself the National Assembly, setting the stage for revolutionary change."
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants