Personalised URL links
This page provides comprehensive insights into optimizing Digital agent chatbot performance through dynamic URL manipulation. By employing these techniques, chatbots can deliver personalized experiences, thereby enhancing user engagement and satisfaction within chatbot ecosystems.
Personalized links offer numerous advantages in enhancing user experience and streamlining interactions. Some compelling use cases include:
Personalised links in pre-set answers
This chapter elucidates integrating personalized links within pre-set answers in chatbot interactions. By incorporating variables containing personalized data and concatenating them with the URL string, chatbots can dynamically generate personalized links tailored to individual users.
Define Variables with personalized data:
Identify the personalized data that needs to be incorporated into the link, such as user IDs, names, or preferences.
Assign these personalized data to variables within the chatbot's logic, ensuring accessibility and ease of use.
Construct Personalized Link:
Concatenate the string representation of the URL with the string variables containing personalized data.
Ensure proper formatting and encoding of the URL components to maintain integrity and functionality.
Use Personalized Link in Message Node:
Utilize the MSG node to store the constructed personalized link as part of the chatbot's response.
In the chatbot bubble GUI, the variable placeholder in this message will be replaced with a personalised URL. You may also use Markdown to format a clickable hyperlinked text.
Include relevant context or instructions to guide users on interacting with the personalized link, if necessary.
Personalised links in generated answers
Two distinct methods are elaborated upon, offering solutions tailored to scenarios where precise parameterization of URLs is pivotal.
We cannot directly add a link with variables in the knowledge base index due to the nature of the response text generated by generative AI. The response text is treated as a single string, devoid of any contextual understanding or variable recognition.
Therefore, inserting a variable placeholder within the response text would simply be interpreted as part of the string itself, rather than as a dynamic parameter to be replaced with specific values.
Method #1: Replace method

Procedure:
Configure one AI node, one FNC node, and one MSG node.
The AI node generates a knowledge base-derived response, concealing it from user visibility.
In the FNC node: - store the output from the AI node, - establish variables, - and formulate the target string of personalised link.
Utilize the Python replace method to generate a modified text.
Present the modified response through the MSG node using variable.
Advantages:
The replace method preserves text integrity by refraining from modifying the response if the original string is absent.
Ensures efficient token utilization and reduced latency in comparison to incorporating an additional AI node.
Disadvantages:
Requires proficiency in Python programming.
Mandates meticulous attention during string search and replacement.
Method #2: Prompt chaining with two AI nodes

Procedure:
Sequentially deploy two AI nodes.
The initial node (AI_GENERATE_FROM_KNOWLEDGEBASE) generates a response from the knowledge base, withholding it from the user interface, with the
current_utterance
serving as input.The subsequent node (AI_REWRITE_LINK_IN_GENERATED_ANSWER) processes the output from the prior step must be used as input
{gpt_response["response_text"]}
.Configure its prompt to examine the generated answer from the previous AI node and, if a link to be personalised is detected, define the format of a link meant to replace it.
Employ GUI-based variables within the AI node interface to facilitate dynamic URL construction. In AI node modal, you may use placeholders of existing variables. Its values will be filled-in while processing the prompt. Don't forget to prompt instruction that, If no link exists in the generated answer, the original text needs to be retianed unchanged.
Don't forget to enable showing the output of this AI node user interface.
Advantages:
Eliminates the necessity for programming skills; instructions can be formulated using natural language.
Exhibits tolerance towards input variations, accommodating semantic nuances.
Disadvantages:
Offers limited control over the decision-making process of generative AI.
Possibility of incomplete or unexpected response modifications.
The involvement of two AI nodes leads to heightened token consumption and latency in providing answers.
Assumptions
Data Prerequisite:
Both methods outlined in this documentation rely on the availability of personalized data, such as email addresses, IDs, or other user-specific information.
These personalized data might be obtained from users during previous steps of the conversation or from a third source via APIs.
example: personalised_email is "[email protected]"
For the Python replace method, the personalized link must be constructed as a concatenation of strings or string variables.
Understanding Target Page Structure:
Knowledge of the structure of the target page is crucial for successful implementation. This understanding enables the incorporation of pre-filled values into the URL, such as pre-filled search fields or form items.
example: https://www.facebook.com/login.php?email=exemple%40email.com
Desired Functionality Upon Clicking Modified Hyperlink:
After clicking the modified hyperlink, the intended functionality is realized. Values are pre-filled based on the parameters added to the URL, enhancing user interactions and facilitating a seamless user experience.
Last updated
Was this helpful?