• Resolved andyg123

    (@andyg123)


    Hi @m4xw3ll,

    When chatting, if the AI responds with a URL in the response, the URL’s are formatting weirdly and appending either . or .</a></p> on the end of the urls (meaning they won’t work when clicked on). I haven’t included any urls in the knowledge base text itself, so it is pulling them from the source urls which are all formatted correctly (ie: no random full stops or html closing tags showing on the end of them).

    For example if a source url is https://www.mysite.com it appears in chats as a link to https://www.mysite.com.</a></p>

    I did try adding a behaviour instruction for the ai itself to remove any additional closing tags which are appended to the end of urls in chats, but it ignored it (was worth a go), so I’m guessing something might need to be tweaked in the mxchat code to prevent it.

    Thanks a lot, Andy

    • This topic was modified 5 months, 3 weeks ago by andyg123.
    • This topic was modified 5 months, 3 weeks ago by andyg123.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support m4xw3ll

    (@m4xw3ll)

    Hi @andyg123,

    Thanks for posting. I went to check this behavior over the weekend and couldn’t get through because of the other error you posted (researching that). Regarding this link issue, I’ve chatted with your bot several times and it always returns the link correctly. Are you reviewing the chat transcripts and seeing the format incorrect there (backend chat transcripts are not formatted the same way frontend UI is processed) or have you seen this behavior on the actual frontend of your website?

    Thanks,

    Maxwell

    Thread Starter andyg123

    (@andyg123)

    Hi @m4xw3ll,

    I was seeing this on the front end when using a different browser and was not logged in to the site at the time.

    Thanks

    Andy

    Thread Starter andyg123

    (@andyg123)

    Hi @m4xw3ll,

    Just had another go at this now that the email issue is fixed. It looks as though I am seeing the formatting issue with the extra closing tags etc in the chat window for the user, but when I login and look at the transcripts they seem to be formatted fine (at least I assume this is how they should show)
    ie: [my product name](https://www.mywebsite.com)

    Looks as though it is just the user on the front end that sees the bad formatting, and the backend is fine.

    Hopefully this narrows it down a bit.

    Thanks, Andy

    Plugin Support m4xw3ll

    (@m4xw3ll)

    Hi @andyg123,

    I see the issue you’re describing. Can you do me a favor and turn off streaming responses? I’m trying to isolate to see what could be causing your issue here. I use streaming responses on my website and do not experience this issue, but it could be something about how long your URLs are, the format, or maybe even the model you’re using, but my guess is that it has to do with how the streaming response is breaking up the URL and still trying to format it. If I can isolate/confirm that this is being caused by streaming it will help me better understand. Also, what chat model are you currently using? Once you turn off streaming let me know and I’ll run some more tests on your bot to see!

    Thanks,

    Maxwell

    Thread Starter andyg123

    (@andyg123)

    Hi @m4xw3ll

    I have turned off streaming responses. The settings I am using are:

    chatmodel: Grok-3 Mini (Affordable) – but from memory I believe I previously tried GPT-5 Mini and had the same issue
    Embedding model: Ada 2 (1536, recommended) – I haven’t changed this at all

    The strange thing is it doesn’t always do it. I just had a chat where about 6 questions were answered perfectly and the links all worked with the word “here” used as link text. Just when I thought it was working, I asked one last question and got a badly formatted link where the url was used for the link text instead of the word “here”.

    FWIW I don’t think it is a url length issue, as some of the links in that chat which worked were the very same url’s which didn’t work in a previous chat.

    Hopefully this helps narrow it down a bit though.

    Thanks a lot for all your help trying to resolve this.

    Andy

    Thread Starter andyg123

    (@andyg123)

    Hi @m4xw3ll

    Quick update. I turned off streaming, turned off contextual awareness and changed the engine to GPT-5 Mini before purging all the cache in lightspeed and then retesting from chrome in incognito mode. Still the exact same problem I’m afraid. I’ve put it back to Grok-3 Mini and reenabled contextual awareness, but I’ve left streaming turned off for now. If you’d like me to test any other settings just let me know.

    Thanks a lot

    Andy

    Plugin Support m4xw3ll

    (@m4xw3ll)

    Hi @andyg123,

    Do you have any guidance in your AI instructions about how it should hyperlink URLs in its response? I was able to eliminate the issue on your chatbot by asking it the question like this:

    Do you offer Photoshop training? If you do and respond with a link please hyperlink the URL like this [we offer it here](URL).

    I would try to adding an instruction to your chatbot about how it should format the hyperlink to see if that helps. For example:

    IMPORTANT:
    - You must hyperlink all URls when responding. When hyperlinking them you must follow this exact format [format example words](formatexampleURL)

    Once you add that I can review again! Apologies for so much back and forth, but AI can be a little tricky sometimes and without it being a clear error code its hard to narrow it down at the moment between a technical issue or a behavior issue. Considering it didn’t happen when I gave your chatbot the instruction on how to hyperlink, I think it’s a behavior/instruction issue at the moment.

    Thread Starter andyg123

    (@andyg123)

    Hi @m4xw3ll

    I think that was it, I swapped out the default phrase in the AI instructions of – hyperlink all URls – and replaced it with the phrase you suggest above, and since then I haven’t had one badly formatted URL.

    Thanks a lot for all your help resolving this one.

    Best Regards

    Andy

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.