# Question and Answer Tutorial

**URL:** <https://support.prodi.gy/t/question-and-answer-tutorial/1883>\
**Category:** Uncategorized\
**Tags:** front-end, usage, custom\
**Created:** [August 9, 2019, 10:29am UTC](https://support.prodi.gy/t/question-and-answer-tutorial/1883 "2019-08-09T10:29:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mouadhhamdi](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mouadhhamdi](https://support.prodi.gy/u/mouadhhamdi)\
**Post date:** [August 9, 2019, 10:29am UTC](https://support.prodi.gy/t/question-and-answer-tutorial/1883/1 "2019-08-09T10:29:46Z")

</div>

Hello,

I wanted to use prodigy for a question and answer task (open questions) like in squad.  
Actually, I could't find tutorials to see it can be done (if it's possible!).  
Ideally I will have a paragraph like:  
This forum is the official place discuss Prodigy, our annotation tool for efficient machine teaching. Feel free to ask questions, report bugs, or share your results and custom recipes.

Question: What is this forum for ?  
Answer: the official place to discuss Prodigy.

Thank you in advance,

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [August 9, 2019, 10:59am UTC](https://support.prodi.gy/t/question-and-answer-tutorial/1883/2 "2019-08-09T10:59:00Z")

</div>

Hi! Just to make sure I understand the question and use case correctly: What exactly do you need the annotators to create? Do you need them to type in free-form input? And do you typically expect that there's always one (or several) spans in the text that directly correspond to the answer?

---

<div class="post-metadata">

**Author:** ![mouadhhamdi](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mouadhhamdi](https://support.prodi.gy/u/mouadhhamdi)\
**Post date:** [August 9, 2019, 11:43am UTC](https://support.prodi.gy/t/question-and-answer-tutorial/1883/3 "2019-08-09T11:43:32Z")

</div>

Hello, thank you for your quick reply.  
Yes exactly I need them to type in free form input, the answer can be one or many it's not an issue (if it's possible many because it gives me more options).  
Thank you.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [August 10, 2019, 11:37am UTC](https://support.prodi.gy/t/question-and-answer-tutorial/1883/4 "2019-08-10T11:37:48Z")

</div>

Thanks for the clarification! Prodigy is very centered around collecting training data for machine learning models, which should typically be _as structured as possible_. So wherever possible, it tries to discourage you from collecting free-form input (which is often difficult to evaluate and compare).

However, there are always exceptions to that rule and Prodigy does support fully custom templates with HTML, CSS and JavaScript. So you could add one with input fields that then update the current task with whatever the user has typed into the field. This should be fairly straightforward to build. You can find examples and more details here:

> [@Custom view templates with scripts](https://support.prodi.gy/t/custom-view-templates-with-scripts/302/6):
>
> Update: All works pretty smoothly already! :tada [custom\_js\_poc] The above example only needed the following html\_template and javascript config: \<button class="custom-button" onClick="updateText()"\> point_down Text to uppercase \</button\> \<br /\> \<strong\>{{text}}\</strong\> let upper = false; function updateText() { const text = window.prodigy.content.text; const newText = !upper ? text.toUpperCase() : text.toLowerCase(); window.prodigy.update({ text: newText }); upper = !upper; …

You could also experiment with a combination where you let the annotators highlight spans in the text _and_ ask for additional information. But that depends on the specifics of your task.
