Skip to content

feat: request contextualization #54

Open
@mhordynski

Description

@mhordynski

Feature description

db-ally should allow the provision of extra context for its runs, such as identifying the user who is asking the question. This context can be particularly useful in StructuredViews to craft responses in a personalized manner, taking into consideration parameters like the identity of the person asking the question or other relevant details.

Motivation

Given the following filters for searching employee database:

filter_by_department(department: str)
filter_by_skill(skill: str)

and user question like this:

Find me employees from my department that are skilled in Python

db-ally should be able to fecth user department from injected context and answer the question.

Additional context

We probably need to design how we want to indicate in IQL that we wish to use context rather than an explicit value. For example:

@decorators.view_filter()
def filter_by_department(self, department: str | SelfKeyword):
    ...

and later in IQL LLM could call filter like this:

filter_by_department(SELF)

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

Status

In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions