https://discord.gg/botpress logo
Occasional HTML Tags in Autonomous Node Output
# 🤝help
g
Autonomous Node is also prompted to strip all HTML/JSX and emit pure Markdown bullets, but occasionally it still outputs raw / tags. This only happens under certain edge cases (e.g. nested lists in the kb), Has anybody successfully completely mitigated this? heres an example:
Copy code
Here are the electric cars we have available:

<ul>
    <li>
      **BMW i5**: Lease price starts from £487.79. It features an automatic gearbox, all-wheel drive, and an impressive acceleration of 3.8 seconds. The battery range is approximately 331.2 miles. 
    </li>
    <li>
      **Polestar 4**: Lease price starts from £438.31. It features an automatic gearbox, rear-wheel drive, and a battery range of 385 miles. 
    </li>
  </ul>
Thanks as always guys!
p
Have you considered routing the kb search to a different workflow and using the query kb card to manipulate the output format in a more explicit manner?
g
thanks for your response @prehistoric-airplane-85682, its not a kb search, execute a filter on a table, parse the results and pass to an Autonomous Node to relay. I think its more a bug with autonomous nodes rather than the kb search.
sorry, i realised i mentioned kb but this specific case isnt kb related, but i have had it with the kb rewrite before, i think this bug is more related to the augmentation of responses, specifically when you pass a fair amount of data to the AN
p
No worries! We are aware that the autonomous node sometimes returns unformatted answers. My suggestion comes from the fact that if you use the autonomous node to do less and instead use explicit search in your kb then the formatting issues are easier to identify and correct via a more controlled approach.
g
yeah that is the method im doing for a textual kb search and similar for an inventory kb search (i use execute code to get records from the table then an autonomous node to present results). Thanks for your help!
p
No problem!
w
i've the same problem without KB and randomly, if i try different conversation the same question shows sometimes an html instead of a markdown list
g
if you use the personality agent and promt it to sanitize any html output it works, but adds latency and over emphasizes the personality.
@white-nest-40686
w
thanks
2 Views