# How can I specify the max length of a RAG response?

**URL:** <https://forum.weaviate.io/t/how-can-i-specify-the-max-length-of-a-rag-response/1091>\
**Category:** Support\
**Created:** [December 12, 2023, 10:22pm UTC](https://forum.weaviate.io/t/how-can-i-specify-the-max-length-of-a-rag-response/1091 "2023-12-12T22:22:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hannah\_Grossman](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/hannah_grossman/32/751_2.png) [@Hannah\_Grossman](https://forum.weaviate.io/u/Hannah_Grossman)\
**Post date:** [December 12, 2023, 10:22pm UTC](https://forum.weaviate.io/t/how-can-i-specify-the-max-length-of-a-rag-response/1091/1 "2023-12-12T22:22:08Z")

</div>

I’m using the Generative Search - OpenAI module and the query responses for grouped\_task are huge. How can I limit the size of these? The docs don’t have much detail for this. The maxTokensProperty in the moduleConfig with the schema doesn’t appear to change this size either.

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [December 18, 2023, 8:35pm UTC](https://forum.weaviate.io/t/how-can-i-specify-the-max-length-of-a-rag-response/1091/2 "2023-12-18T20:35:35Z")

</div>

Hi @Hannah_Grossman ! Welcome to our comnmunity 🤗

Have you tried passing it as an instruction whithin the prompt itself?
