Skip to content

Fix prompt formation depending on DbResponse contents #217

@rcrisanti

Description

@rcrisanti

Some of the flowkit functions for building prompts take in an array of DbResponses. The structure of the query assumes these DbResponses are associated with python code examples, since they generate of form like

Based on the following examples:

--- START EXAMPLE {response_n}---
>>> Summary:
{knowledge_db_response_n_summary}

>>> Code snippet:
```python
{knowledge_db_response_n_text}
```
--- END EXAMPLE {response_n}---

--- START EXAMPLE {response_n}---
...
--- END EXAMPLE {response_n}---

Generate the Python code for the following request:

>>> Request:
{original_request}

but DbResponses can be associated with any of code gen elements, user guide sections, or examples, depending on the qdrant collection the user has queried.

We need to fix this otherwise the prompts we're sending could be really bad

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions