Skip to content

Question: How to extract date ranges #8

Description

@reuschling

I try to extract date ranges for a database query filter.

The template attributes definition is something like this:
{"date-filter_start":"date-time",
"date-filter_end":"date-time"}

I want that the right values will be extracted if the date specification in the context is not directly mentioned. E.g 'Show me the entries of the last half year' or 'everything from june 2023'

I have two related questions:

  • Is this possible with the date-time type, or is date-time also 'verbatim'. I get it to work with attributes like "date-filter_start_YYYY-MM-DD":"string"
  • In order to get 'last december' to work, the prompt needs also the current date. I am not sure where to place it. I currently add to the context text 'the current date is X'. But it feels a bit risky to modify the origin text.

At the end it works, but I don't know how to do it best.

One final question: Is it mandatory that all template attributes in an example output are specified, or is it enough to specify just one to tell what the value format is? Maybe this is a better alternative for 'date-filter_start_YYYY-MM-DD'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions