the model uses string for dates when querying MongoDB

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.0.1
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • Developer Tools

      While we can't fix the model, we should improve our prompting to improve the changes of the model using $date instead of ordinary ISO strings for querying MongoDB, as it won't work when the queried field is a date and not a string.

      Example:

      Prompt: "can you find me all movies updated in the last 20 years?"
      Query:

      { "lastupdated": { "$gte": "2005-09-15T00:00:00Z" } }
      

      Expected:

      Query:

      { "lastupdated": { "$gte": { "$date": "2005-09-15T00:00:00Z" } } }
      

      As in: https://www.mongodb.com/docs/manual/reference/mongodb-extended-json/#mongodb-bsontype-Date

            Assignee:
            Kevin Mas Ruiz
            Reporter:
            Kevin Mas Ruiz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: