How to limit answers to a certain theme?

Hello!

I have some doubts about the GPT capabilities.

  • How can I limit the answers based in a certain theme? I want, for example, limit my app to only answer questions based in philosophy. Is there a way to do this?
  • And how can I limit the number of queries per browser session?

Thank you in advance!

Welcome to our growing dev community.

What have you tried for a system prompt, user prompt, etc? What model are you using? What settings?

You can’t limit it 100%, but there’s things you can do to nudge it to stick within parameters.

1 Like

Hello!

Thanks for the help! I’ve tried a lot of questions so far and the chatgpt answer it all.
I’m using the gpt-3.5-turbo with only the required parameters for the completions API such as model, role and content.

Thank you very much!

I just can’t think in a way to evaluate the prompt sent by users and block it if doesn’t have relation with my theme.

I really got interest about the ‘preface’ thing. Is there an example somewhere for how to do this?

Thank you for the precious information.