a
    dg3                     @   s   d dl mZ d dlmZ edg ddZdddd	d
dddddddddgZeedd eD dddg ddZeeedddg ddZdS )    )FewShotPromptTemplate)PromptTemplatezHuman: {input_prompt}

Model: {output_from_model}

Fallacy Critique Request: {fallacy_critique_request}

Fallacy Critique: {fallacy_critique})input_promptoutput_from_modelfallacy_critique_requestfallacy_critique)templateinput_variableszJIf everyone says the Earth is round,         how do I know that's correct?z:The earth is round because your         teacher says it isuN  Identify specific ways in        which the model’s previous response had a logical fallacy.         Also point out potential logical fallacies in the human’s         questions and responses. Examples of logical fallacies         include but are not limited to ad hominem, ad populum,         appeal to emotion and false causality.a7  This statement contains the logical         fallacy of Ad Verecundiam or Appeal to Authority. It is         a fallacy because it asserts something to be true purely         based on the authority of the source making the claim,         without any actual evidence to support it.  Fallacy         Critique NeededzPlease rewrite the model         response to remove all logical fallacies, and to         politely point out any logical fallacies from the         human.a  The earth is round based on         evidence from observations of its curvature from high         altitudes, photos from space showing its spherical shape,         circumnavigation, and the fact that we see its rounded         shadow on the moon during lunar eclipses.)r   r   r   r   fallacy_revision_requestZfallacy_revisionzShould we invest more in our school         music program? After all, studies show students         involved in music perform better academically.zI don't think we should invest         more in the music program. Playing the piccolo won't         teach someone better math skills.uW  Identify specific ways         in which the model’s previous response had a logical         fallacy. Also point out potential logical fallacies         in the human’s questions and responses. Examples of         logical fallacies include but are not limited to ad         homimem, ad populum, appeal to emotion and false         causality.ap  This answer commits the division         fallacy by rejecting the argument based on assuming         capabilities true of the parts (playing an instrument         like piccolo) also apply to the whole         (the full music program). The answer focuses only on         part of the music program rather than considering it         as a whole.  Fallacy Critique Needed.zPlease rewrite the model         response to remove all logical fallacies, and to         politely point out any logical fallacies from the human.a  While playing an instrument may         teach discipline, more evidence is needed on whether         music education courses improve critical thinking         skills across subjects before determining if increased         investment in the whole music program is warranted.c                 C   s   g | ]}d d |  D qS )c                 S   s   i | ]\}}|d kr||qS )r
    ).0kvr   r   |/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/langchain_experimental/fallacy_removal/prompts.py
<dictcomp>S       z<listcomp>.<dictcomp>)items)r   er   r   r   
<listcomp>R   s   r   aL  Below is a conversation between a human and an     AI assistant. If there is no material critique of the     model output, append to the end of the Fallacy Critique:     'No fallacy critique needed.' If there is material     critique     of the model output, append to the end of the Fallacy     Critique: 'Fallacy Critique needed.'zyHuman: {input_prompt}
Model: {output_from_model}

Fallacy Critique Request: {fallacy_critique_request}

Fallacy Critique:z
 === 
)r   r   r   )Zexample_promptexamplesprefixsuffixZexample_separatorr	   z@Below is a conversation between a human and     an AI assistant.a  Human: {input_prompt}

Model: {output_from_model}

Fallacy Critique Request: {fallacy_critique_request}

Fallacy Critique: {fallacy_critique}

If the fallacy critique does not identify anything worth changing, ignore the Fallacy Revision Request and do not make any revisions. Instead, return "No revisions needed".

If the fallacy critique does identify something worth changing, please revise the model response based on the Fallacy Revision Request.

Fallacy Revision Request: {fallacy_revision_request}

Fallacy Revision:)r   r   r   r   r
   N)Zlangchain_core.prompts.few_shotr   Zlangchain_core.prompts.promptr   Zfallacy_critique_exampler   ZFALLACY_CRITIQUE_PROMPTZFALLACY_REVISION_PROMPTr   r   r   r   <module>   sL   <