Skip to content

Commit

Permalink
Update 0350 - draft-prompt.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fscelliott committed Nov 8, 2024
1 parent 62ba08d commit b5115b9
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,24 @@ TODO: search through the 'see notes' and mae sure accurate, some were taken from

| SenseML parameter<sup>1</sup> | value | notes | interactions |
| :---------------------------------- | :----------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| | | ***CONTEXT SIZE*** | |
| chunkCount | number. default: see each method's [reference topic](doc:llm-based-methods) | Configures context's size. For details about context and chunks, see the Notes section.<br/>The number of top-scoring chunks Sensible combines as context as part of the full prompt it submits to an LLM. <br/>Applies to each LLM-based field in the config.<br/>Often, chunk count and chunk size are related. For example, if you know that your target data are spread over 7-10 pages, and occupy a small portion of those pages, you can specify a chunk count of 10 and a half-page chunk size. | In the List method, by default the actual chunk count can be less than what's specified. if you set the LLM Engine method to Thorough, then Sensible sets this parameter to 20 and ignores any configured values. *todo check if true* |
| chunkSize | `0.5`, `1` default: see each method's [reference topic](doc:llm-based-methods) | Configures context's size. For details about context and chunks, see the Notes section.<br/>The size of the chunks Sensible splits the document into, as a page fraction. For example, `0.5` specifies each chunk is half a page.<br/>Applies to each LLM-based field in the config. <br/>Often, chunk count and chunk size are related. For example, if you know that the data you seek is contained in one cover page, you can set chunk size to 1 and a chunk count to 1. | If you set Search By Summarization to true, then Sensible sets this parameter to 1 and ignores any configured values. *todo check if true* |
| chunkOverlapPercentage | `0`, `0.25`, `0.5` default: see each method's [reference topic](doc:llm-based-methods) | Configures context's size. For details about context and chunks, see the Notes section.<br/>The extent to which chunks overlap, as a percentage of the chunks' height. For example, `0.5` specifies each chunk overlaps by half its height. <br/>Applies to each LLM-based field in the config. <br/>Sensible recommends setting a non-zero overlap to avoid splitting data across chunks. Set overlap to 0 solely if you're confident that your document layout doesn't flow across page boundaries and you're using a one-page chunk size. | If you set Search By Summarization to true, then Sensible sets this parameter to 0 and ignores any configured values. *todo check if true* |
| | | ***CONFIGURE CONTEXT SIZE*** | |
| chunkCount | number. default: see each method's [reference topic](doc:llm-based-methods) | Configures context's size. For details about context and chunks, see the Notes section.<br/>The number of top-scoring chunks Sensible combines as context as part of the full prompt it submits to an LLM. <br/>Often, chunk count and chunk size are related. For example, if you know that your target data are spread over 7-10 pages, and occupy a small portion of those pages, you can specify a chunk count of 10 and a half-page chunk size. | - For the List method, if you set the LLM Engine method to Thorough, then Sensible sets this parameter to 20 and ignores any configured value.<br/>- For the List method, if you set the LLM Engine method to Fast, then Sensible can select a smaller subset of chunks than the number specified in this parameter. |
| chunkSize | `0.5`, `1` default: see each method's [reference topic](doc:llm-based-methods) | Configures context's size. For details about context and chunks, see the Notes section.<br/>The size of the chunks Sensible splits the document into, as a page fraction. For example, `0.5` specifies each chunk is half a page. <br/>Often, chunk count and chunk size are related. For example, if you know that the data you seek is contained in one cover page, you can set chunk size to 1 and a chunk count to 1. | If you set Search By Summarization to true, then Sensible sets this parameter to 1 and ignores any configured values. |
| chunkOverlapPercentage | `0`, `0.25`, `0.5` default: see each method's [reference topic](doc:llm-based-methods) | Configures context's size. For details about context and chunks, see the Notes section.<br/>The extent to which chunks overlap, as a percentage of the chunks' height. For example, `0.5` specifies each chunk overlaps by half its height. <br/>Sensible recommends setting a non-zero overlap to avoid splitting data across chunks. Set overlap to 0 solely if you're confident that your document layout doesn't flow across page boundaries and you're using a one-page chunk size. | If you set Search By Summarization to true, then Sensible sets this parameter to 0 and ignores any configured values. |
| | | | |
| | | ***FIND CONTEXT*** | |
| searchBySummarization | boolean. default: false | Set this to true to troubleshoot situations in which Sensible misidentifies the part of the document that contains the answers to your prompts. <br/>This parameter is compatible with documents up to 1,280 pages long.<br/>When true, Sensible uses a [completion-only retrieval-augmented generation (RAG) strategy](https://www.sensible.so/blog/embeddings-vs-completions-only-rag): Sensible prompts an LLM to summarize each page in the document, prompts a second LLM to return the pages most relevant to your prompt based on the summaries, and extracts the answers to your prompts from those pages.<br/><br/>For more information about this parameter, see the Notes section. | If you set this parameter to true, then Sensible sets the following for chunk-related parameters and ignores any configured values:<br/><br/>- Chunk Size parameter: 1<br/>- Chunk Overlap Percentage parameter: 0<br/>- Chunk Count parameter: 5 <br/>- Chunk Scoring Text parameter (for the Query Group).<br/> |
| pageHinting | boolean. default: true | Configures context's metadata. For details about context and chunks, see the Notes section. <br/>Includes or or removes page metadata for each chunk from the full prompt Sensible inputs to an LLM.<br/>Applies to each LLM-based field in the config.<br/>For example, if your PDF converter automatically applied page numbers to scanned ID cards, set this parameter to false to ignore the page numbers, since their relationship to the cards' text is arbitrary.<br/><br/>If set to true, then you can add location information to a prompt to narrow down the context's location. For example:<br/>**Location relative to page number and position on page**<br/>- "address in the top left of the first page of the document"<br/> - "What is the medical paid value on the last claim of the second page?"<br/>**Location relative to content in document**<br/>- "total amount in the expense table" <br/>- "phone number after section 2" | |
| searchBySummarization | boolean. default: false | Set this to true to troubleshoot situations in which Sensible misidentifies the part of the document that contains the answers to your prompts. <br/>This parameter is compatible with documents up to 1,280 pages long.<br/>When true, Sensible uses a [completion-only retrieval-augmented generation (RAG) strategy](https://www.sensible.so/blog/embeddings-vs-completions-only-rag): Sensible prompts an LLM to summarize each page in the document, prompts a second LLM to return the pages most relevant to your prompt based on the summaries, and extracts the answers to your prompts from those pages.<br/><br/>For more information about this parameter, see the Notes section. | If you set this parameter to true, then Sensible sets the following for chunk-related parameters and ignores any configured values:<br/><br/>- Chunk Size parameter: 1<br/>- Chunk Overlap Percentage parameter: 0<br/>- Chunk Count parameter: 5 <br/>- (for the Query Group method) Chunk Scoring Text parameter<br/> |
| pageHinting | boolean. default: true | Configures context's metadata. For details about context and chunks, see the Notes section. <br/>Includes or or removes page metadata for each chunk from the full prompt Sensible inputs to an LLM.<br/>For example, if your PDF converter automatically applied page numbers to scanned ID cards, set this parameter to false to ignore the page numbers, since their relationship to the cards' text is arbitrary.<br/><br/>If set to true, then you can add location information to a prompt to narrow down the context's location. For example:<br/>**Location relative to page number and position on page**<br/>- "address in the top left of the first page of the document"<br/> - "What is the medical paid value on the last claim of the second page?"<br/>**Location relative to content in document**<br/>- "total amount in the expense table" <br/>- "phone number after section 2" | |
| pageRange | object | Configures the possible page range for finding the context in the document. For details about context and chunks, see the Notes section.<br/>If specified, Sensible creates chunks in the page range and ignores other pages. For example, use this parameter to improve performance, or to avoid extracting unwanted data if your prompt has multiple candidate answers.<br/><br/>Contains the following parameters: <br/>`startPage`: Zero-based index of the page at which Sensible starts creating chunks (inclusive). <br/>`endPage`: Zero-based index of the page at which Sensible stops creating chunks (exclusive).<br/><br/>**Note:** Sensible ignores this parameter when searching for a field's anchor. If you want to exclude the field's anchor from the page range, use the [Page Range](doc:page-range) preprocessor instead.<br/> | |
| | | | |
| | | ***COMPLETENESS OF CONTEXT*** | |
| | | ***ENSURE COMPLETENESS OF CONTEXT*** | |
| | | | |
| | | | |
| | | | |
| | | ***MISCELLANEOUS*** | |
| contextDescription | string. default: `The below context is an excerpt from a document.` | Configures context's metadata. For details about context and chunks, see the Notes section.<br/>Overwrites the default context description.<br/>Applies to each LLM-based field in the config.<br/>For example:<br/>\- `The below context is an excerpt from a scanned index card that contains botanical information about a single plant species, including phenology information.`<br/>\- `The below context is an excerpt from an email. Assume the sender is always an automated system from an insurance broker.` | |
| contextDescription | string. default: `The below context is an excerpt from a document.` | Configures context's metadata. For details about context and chunks, see the Notes section.<br/>Overwrites the default context description.<br/>For example:<br/>\- `The below context is an excerpt from a scanned index card that contains botanical information about a single plant species, including phenology information.`<br/>\- `The below context is an excerpt from an email. Assume the sender is always an automated system from an insurance broker.` | |
| (**Deprecated**) promptIntroduction | string | Deprecated. Overwrites the introductory text at the beginning of the full prompt that Sensible submits to the LLM. | |
| confidenceSignals | boolean.<br/>defaults: true in visual editor,<br/> false in JSON editor | If specified, Sensible prompts the LLM to report any uncertainties it has about the accuracy of its response. For more information, see [Qualifying LLM accuracy](doc:confidence).<br/>Applies to each supported method in the config. Sensible currently supports this parameter for the [Query Group](doc:query-group) method. | Not supported if you set the Multimodal Engine parameter on the Query Group method. |
| confidenceSignals | boolean.<br/>defaults: true in visual editor,<br/> false in JSON editor | If specified, Sensible prompts the LLM to report any uncertainties it has about the accuracy of its response. For more information, see [Qualifying LLM accuracy](doc:confidence).<br/>Sensible currently supports this parameter for the [Query Group](doc:query-group) method. | Not supported if you set the Multimodal Engine parameter on the Query Group method. |
| | | | |
| | | | |
| | | | |
Expand Down

0 comments on commit b5115b9

Please sign in to comment.