You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

autokeyword_autoquestion.mdx 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ---
  2. sidebar_position: 3
  3. slug: /autokeyword_autoquestion
  4. ---
  5. # Auto-keyword Auto-question
  6. import APITable from '@site/src/components/APITable';
  7. Use a chat model to generate keywords and questions from each chunk in the knowledge base.
  8. ---
  9. When selecting a chunking method, you can also enable auto-keyword or auto-question generation to increase retrieval rates. This feature uses a chat model to produce a specified number of keywords and questions from each created chunk, generating a layer of "higher-level information" from the original content.
  10. :::caution WARNING
  11. Enabling this feature increases document indexing time and uses extra tokens, as all created chunks will be sent to the chat model for keyword or question generation.
  12. :::
  13. ## What is Auto-keyword?
  14. Auto-keyword refers to the auto-keyword generation feature of RAGFlow. It uses a chat model to generate a set of keywords or synonyms from each chunk to correct errors and enhance retrieval accuracy. This feature is implemented as a slider under **Page rank** on the **Configuration** page of your knowledge base.
  15. **Values**:
  16. - 0: (Default) Disabled.
  17. - Between 3 and 5 (invlusive): Recommended if you have chunks of approximately 1,000 characters.
  18. - 30 (maximum)
  19. :::tip NOTE
  20. - If your chunk size increases, you can increase the value accordingly. Please note, as the value increases, the marginal benefit decreases.
  21. - An Auto-keyword value must be an integer. If you set it to a non-integer, say 1.7, it will be rounded down to the nearest integer, which in this case is 1.
  22. :::
  23. ## What is Auto-question?
  24. Auto-question is a feature of RAGFlow that automatically generates questions from chunks of data using a chat model. These questions (e.g. who, what, and why) also help correct errors and improve the matching of user queries. The feature usually works with FAQ retrieval scenarios involving product manuals or policy documents. And you can find this feature as a slider under **Page rank** on the **Configuration** page of your knowledge base.
  25. **Values**:
  26. - 0: (Default) Disabled.
  27. - 1 or 2: Recommended if you have chunks of approximately 1,000 characters.
  28. - 10 (maximum)
  29. :::tip NOTE
  30. - If your chunk size increases, you can increase the value accordingly. Please note, as the value increases, the marginal benefit decreases.
  31. - An Auto-question value must be an integer. If you set it to a non-integer, say 1.7, it will be rounded down to the nearest integer, which in this case is 1.
  32. :::
  33. ## Tips from the community
  34. The Auto-keyword or Auto-question values relate closely to the chunking size in your knowledge base. However, if you are new to this feature and unsure which value(s) to start with, the following are some value settings we gathered from our community. While they may not be accurate, they provide a starting point at the very least.
  35. ```mdx-code-block
  36. <APITable>
  37. ```
  38. | Use cases or typical scenarios | Document volume/length | Auto_keyword (0–30) | Auto_question (0–10) |
  39. |---------------------------------------------------------------------|---------------------------------|----------------------------|----------------------------|
  40. | Internal process guidance for employee handbook | Small, under 10 pages | 0 | 0 |
  41. | Customer service FAQs | Medium, 10–100 pages | 3–7 | 1–3 |
  42. | Technical whitepapers: Development standards, protocol details | Large, over 100 pages | 2–4 | 1–2 |
  43. | Contracts / Regulations / Legal clause retrieval | Large, over 50 pages | 2–5 | 0–1 |
  44. | Multi-repository layered new documents + old archive | Many | Adjust as appropriate |Adjust as appropriate |
  45. | Social media comment pool: multilingual & mixed spelling | Very large volume of short text | 8–12 | 0 |
  46. | Operational logs for troubleshooting | Very large volume of short text | 3–6 | 0 |
  47. | Marketing asset library: multilingual product descriptions | Medium | 6–10 | 1–2 |
  48. | Training courses / eBooks | Large | 2–5 | 1–2 |
  49. | Maintenance manual: equipment diagrams + steps | Medium | 3–7 | 1–2 |
  50. ```mdx-code-block
  51. </APITable>
  52. ```