balphi·há 2 anos·discussHow are you using regex to end the while loop? Are you detecting a specific substring or is it something more complex?
balphi·há 2 anos·discussI think its unintuitive relative to the standard implementation of RAG today (e.g. vector-based similarity)