Getting data without making it as the dynamic vari...
# support
u
I am using transient assistant, and I want to use the data I am fetching info from the database as the instruction for the prompt, since the info or the data fetched are too many and cannot be used as a dynamic variables, so I kind of stuck because without those info the prompt is not able to understand the path/workflow it should proceed with.
v
@08anas It sounds like you're trying to use dynamic data from a database to inform the instructions for your transient assistant's prompt. If the data is too extensive to use as dynamic variables directly within the template, you might consider summarizing or processing the data into a more concise format that can be used by the assistant. Here are a few strategies you could employ: 1. **Data Summarization**: Before passing the data to the assistant, summarize the key points that are necessary for the prompt to understand the workflow. This could involve extracting the most relevant pieces of information or aggregating data into a simpler form. 2. **Data Processing**: Write a script or function that processes the fetched data into a structured format that the assistant can interpret. This might mean converting database rows into a list of instructions or a decision tree that the assistant can follow. 3. **Chunking**: If the data can be divided into smaller, manageable pieces, you could design the assistant to handle one chunk at a time. This way, the assistant can progress through the workflow step by step, requesting additional data as needed. 4. **State Management**: Maintain a state within your application that tracks the progress of the conversation or workflow. As the assistant moves through the workflow, update the state accordingly and fetch only the relevant data for the next step. 5. **Custom Logic**: Implement custom logic within your assistant that can interpret and navigate through the data. This could involve writing custom code that acts as an intermediary between the raw data and the assistant's prompts. Remember to ensure that any data passed to the assistant is formatted in a way that is secure and respects user privacy and data protection regulations. If you need further assistance with implementing these strategies or if you have a specific use case in mind, please provide more details, and I'll be happy to help you further.
You can continue this conversation by mentioning me in the message.
u
@User The data can neither be chunked nor be summarized, it is the details of a person and everything related to it, but the prompt depends upon those details extracted from the database, now I can just use some part of those data in the dynamic variable to greet the caller by the name, but other details for example, location, email address and family member details just guide the prompt to follow a certain path to respond. Since, I cannot include those details in the dynamic variables, I just want t understand, how can I include those info so that prompt relates to it. Also, I want to understand if multiple functions/tools are attached to a transient assistant, and the call will always require multiple function/tool calls, how can I get that thing working then without skipping those calls?
@Vapi The data can neither be chunked nor be summarized, it is the details of a person and everything related to it, but the prompt depends upon those details extracted from the database, now I can just use some part of those data in the dynamic variable to greet the caller by the name, but other details for example, location, email address and family member details just guide the prompt to follow a certain path to respond. Since, I cannot include those details in the dynamic variables, I just want t understand, how can I include those info so that prompt relates to it. Also, I want to understand if multiple functions/tools are attached to a transient assistant, and the call will always require multiple function/tool calls, how can I get that thing working then without skipping those calls?
s
Hey @08anas To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help me figure out what went wrong!
3 Views