Iwant to create a field in a template (dotx) that, when starting a new document from that template, would prompt for information. The field is something that repeats over and over in the document. I want to be able to enter it once and that it would update itself across the document.
If you select the field and press F9, you should see a dialog box where you can type the value you need. When you have entered the value, Word should display the value at the location where the FILLIN field is (press Alt-F9 to toggle between "field codes" and "field results" view.
When you create a new document based on the template, Word should execute the FILLIN, then update all the myfield fields. But if the user needs to change the value later, they will need to select the entire document (e.g.ctrl-A) and press F9 to see the prompt again. In that case, I'm not sure the fields will be updated everywhere.
There is another field type called ASK which, in effect, combines a SET and a FILLIN, but it is not automatically executed when you create a new document based on the template so is not such a good choice for this task.
I was able to just use simple FILLIN fields for my application, but I was having a hard time getting my prompt windows to appear when opening the document. I didn't realize that I had to save the word document as a template (.dotx) before it would work. After I did that it worked great!
I just tried to get the FILLIN merge field to work per the instructions and couldn't get it to work. A less complex way is to use the STYLEREF merge field. To do this, create a generic field name for the first instance of the data (e.g. "organization" or "date") and create a unique style for it (for the purposes of these instructions, I'll call it "Style1"). At each place in the document where you want the data to repeat, select ctl+F9 and insert STYLEREF "Style1" between the brackets (it will look like this: STYLEREF "Style1" . So long as you don't disassociate the style from the first entry. Note, don't use the style you've used for anything else but for that merge field. Word populates this merge field from the last know entry for the style.
I created a template with a custom document property called "myproperty". I can access this using fields with the DOCPROPERTY "myproperty" command.I want to make Word prompt the user for a value and set it as a value for myproperty. I know I can prompt using the FILLIN command, but I don't know how to pass the value to myproperty. The SET command seems to work only with bookmarks.
In order for user input in the document to update a document property the Custom Document Property must be created using VBA and linked to a bookmark. This change will not show up, however, until the document has been saved, closed and re-opened. I suspect this is not optimal behavior for your purposes...
So your only option would be to use code, such as VBA. A very simple approach would be to display an InputBox then write the result to the property. For this to be really robust, you'd probably also need to validate the user input.
I have only tried using temperature=0.4 and temperature=0.8, but from what I have done, tuning temperature and repetition_penalty both result in either the context being copied or a nonsensical answer.
Then the response from Llama-2 directly mirrors one piece of context, and includes no information from the others. Furthermore, it produces many newlines after the answer. If the answer is 100 tokens, and max_new_tokens is 150, I have 50 newlines.
Kind of having the same issue here. Sometimes I am expecting a long answer so I set the max_new_tokens to a high number. But if I do that and I am expecting a short answer, the model responds and then adds part of my input prompt until it reaches the max_new_tokens value. I have seen examples in Llama-1 where the model can give both short and long answers without including any nonsense words as padding to reach max_new_tokens. Did I do something wrong during fine-tuning?
I would have some questions first: How are you using the model (with generate, pipeline, etc.)? Would it be possible to give the final formatted prompt that you forward to your model as input?
Apart from this: You are giving the llama an instruction. But I guess for this purpose meta-llama/Llama-2-7b-chat-hf would be the better choice.
I was able to reproduce the behavior you described. Afterwards I tried it with the chat model and it hardly was better. Then I tried to reproduce the example Huggingface gave here: Llama 2 is here - get it on Hugging Face (in the Inference section). The model in this example was asked
I am a fan of crime dramas, but I also enjoy historical dramas and comedies. I am open to watching something new and different, but I want it to be good quality and engaging.
Please let me know if you have any suggestions.
Thanks!
It repeats the query until it cuts off. It is interesting how it slightly varies it, like adding a space to turn this day.[/INST] into this day. [/INST]. Was there anything else that you did while testing?
Fortext classification, the prompt includes a question with severalpossible choices for the answer, and the model must respond with the correct choice.Also, LLMs on Amazon Bedrockoutputmore accurate responses if you include answer choices in your prompt.
Thefollowing example uses Anthropic Claude models to classify text. Assuggested in AnthropicClaude Guides, use XML tags such asto denote important partsofthe prompt. Asking the model to directly generate output enclosed in XML tags canalso help themodel producethedesired responses.
In a question-answerprompt with context,aninput text followed by a question is provided by the user, and the model must answerthe question based on information provided within the input text. Putting thequestion in the end after the text can help LLMs onAmazon Bedrockbetter answer the question.Modelencouragement works for this use case as well.
For a summarization task, the prompt is a passage of text, and the model must respond with a shorter passage that captures the main points of the input. Specification of the output in terms of length (number of sentences or paragraphs) is helpful for this use case.
In the following example,Anthropic Claudesummarizes the given text in one sentence. To include input text in your prompts,format the text with XML mark up: text content. Using XML within prompts is a common practice whenpromptingAnthropic Claudemodels.
A prompt template is like a fill-in-the-blank guide used by GPT for Work extensions in the background to shape AI responses. It presents a structured format with blanks or placeholders for your input. After filling these blanks, the customized template is sent to the model provider, directing how the AI should use and respond to your input.
To find the token count for each function prompt template, visit the cost estimator and select a function. The number of input tokens shown when the input fields are empty is the token count for the prompt template.
The S-Docs Runtime Prompts feature allows you to set up forms with questions for users to respond to during the document generation process. This form input can then be merged into the document and/or conditionally render certain sections of the document.
Although different options will appear for each type of prompt, this is the basic layout of the Runtime Prompts menu. Each piece of input you'd like to collect from your users is called a "Prompt." You can create as many as you like. To create a basic prompt:
[2] Name the merge field for this prompt and place it within the template body. The user's response to the prompt will appear where the merge field is placed.
Note: Merge field name must start with a letter; numbers or symbols will cause an error.[3] Write the prompt itself. This is the question the user sees and responds to during the document generation process.
[1] Set the prompt type to Text to create a text prompt.
[2] Make this prompt required or optional. The user will not be able to finish generating this document without responding to this prompt if it is required.
[3] Name the merge field for this prompt and place it within the template body. This name cannot start with a number or special character. The user's response to this prompt will appear where the merge field is placed. This merge field can also be used within conditional statements.
Note: Merge field name must start with a letter; numbers or symbols will cause an error.
[4] Preformatting tool to assign a specific number of characters that can be entered. Use an X to indicate any single-character input, or use a # to indicate a digit. For example, for U.S. phone numbers, do '(###) ###-####'.
[5] Write the text prompt itself. This is the question the user sees above the text box during document generation.
[6] Choose a Salesforce text field to write this data back to.
[8] Choose which page this text prompt should appear on. You can create up to 10 different pages for your Runtime Prompts.
[9] Specify conditions for this prompt to be shown. This field accepts conditional statements, and can be used with regular merge fields and Runtime Prompt merge fields (see the Runtime Prompt Decision Trees section of this article for more information).
[10] Choose to prepopulate this prompt with the user's previous response. This means that if they typed "Example Response" into the text box the last time they generated this document, the default value for this field will be "Example Response" the next time they generate it.
[11] Specify a default value for this prompt. This will be used if the user leaves the prompt blank.
[1] Set the prompt type to Date to create a date prompt.
[2] Make this prompt required or optional. The user will not be able to finish generating this document without responding to this prompt if it is required.
[3] Name the merge field for this prompt and place it within the template body. This name cannot start with a number or special character. The user's response to this prompt will appear where the merge field is placed. This merge field can also be used within conditional statements.
Note: Merge field name must start with a letter; numbers or symbols will cause an error.
Note: This date field can be formatted with format-date (e.g. !ExamplePrompt MM/dd/yyyy), or it can be used to filter a WHERE clause in your related list (e.g. WHERE CreatedDate > !ExamplePrompt), or it can do pretty much anything else an ordinary date merge field can do.[4] Write the date prompt itself. This is the question the user sees above the date picker during document generation.
[5] Choose a Salesforce date field to write this data back to.
3a8082e126