llm-guard icon indicating copy to clipboard operation
llm-guard copied to clipboard

Detecting code from free flow text prompt

Open aditya1709 opened this issue 1 year ago • 3 comments

Was wondering if the input scan here can detect and extract code in free flow text prompt? For example when the prompt contains code without the three backticks or markdown?

aditya1709 avatar Jan 20 '24 21:01 aditya1709

Hey @aditya1709 , thanks for raising the issue here.

We actually looked at that using a few methods but it's not really trivial as code can be in many programming languages and sometimes it can be partial code. Anyway, recently we found a way to achieve that which still needs to be tested.

I will keep you posted

asofter avatar Jan 22 '24 20:01 asofter

Thanks @asofter I have been working on this independently and would be down to collaborate if we can work on it together. I have a solution that I have almost built as well.

aditya1709 avatar Jan 22 '24 20:01 aditya1709

That's awesome. Are you part of our Slack (invite? Let's connect there and discuss the next steps

asofter avatar Jan 22 '24 20:01 asofter