4

Let's say I'm a law firm and I have this tables(basic structure)

  • users: name, email, telephone etc..
  • employees: kind, name, email, telephone etc..
  • cases: case name, casenumber, parties names, attorney assigned, entries, last update, status, open_date, close_date
  • tasks: case_id, employee_assigned, employee_assigner,statusdue_at
  • communication: date, user_id, employee_id, text, kind, duration
  • cases_assignations: employee_id, case_id

So let's say now I want to train a model with chatGPT or another solution so if for example the employee types:

**Input**: I would like to know the tasks assigned to John that are days due
**output**: John has 3 tasks that are due, these are: Task 1, task 2 ,task 3

**Input**: I would like to how many cases are open
**output**: There are 8 cases open right now
      
**Input**: I would like to how when did john communicate last time with client Elena 
**output**:  John communicate with Elena on october 8 at 6 am on phone and it last 5 minutes

**Input**: I would like to how the cases that John as opened and last update is more than 5 days before
**output**:  John has 8 cases open that are 5 days before, these are: case 1 ,case 2, case 3, case 4

etc... makes sense? I would like to know the strategy to make this possible

John Balvin Arias
  • 2,632
  • 3
  • 26
  • 41
  • Hey were you able to do this ? I also have similar table with my org data, that I want to ask natural language questions and get answer to. – DJKarma Mar 30 '23 at 16:57
  • @DJKarma no yet – John Balvin Arias Mar 30 '23 at 17:07
  • For ChatGPT specifically, the challenge is that the token limit for a message is no doubt going to be less than the size of your data set. Depending on the size of your schema, you might be able to submit the schema definition to ChatGPT, then pose those questions as something like "Write the SQL statement for the schema I gave you to return the results that answer..." – busse Apr 13 '23 at 18:00

0 Answers0