Visitar URL original
Agentic.Questions
agentic
Safe HaskellNone
LanguageGHC2021

Agentic.Questions

Description

Questions for a System One model such as Jev: a step asks Questions about its input.

Synopsis

Questions

data Questions a Source #

One or more questions about the same input, sent as one request. Combine them applicatively:

judge (Review <$> funny <*> groan)

Constructors

Questions 

Fields

Instances

Instances details
Applicative Questions Source # 
Instance details

Defined in Agentic.Questions

Methods

pure :: a -> Questions a #

(<*>) :: Questions (a -> b) -> Questions a -> Questions b #

liftA2 :: (a -> b -> c) -> Questions a -> Questions b -> Questions c #

(*>) :: Questions a -> Questions b -> Questions b #

(<*) :: Questions a -> Questions b -> Questions a #

Functor Questions Source # 
Instance details

Defined in Agentic.Questions

Methods

fmap :: (a -> b) -> Questions a -> Questions b #

(<$) :: a -> Questions b -> Questions a #

yesNo :: Text -> Questions YesNo Source #

Jev's Noul primitive: how likely is it that the answer is yes?

choice :: Options a => Text -> Questions (Choice a) Source #

Pick one of an Options type's values.

score :: Options a => Text -> Questions (Score a) Source #

Place the input on an Options type's levels, lowest first.

Answers

data Probability Source #

A probability, held as basis points (0–10000) so that results replay and compare exactly. Write literals directly: 0.9 :: Probability.

Instances

Instances details
Contract Probability Source # 
Instance details

Defined in Agentic.Questions

Eq Probability Source # 
Instance details

Defined in Agentic.Questions

Ord Probability Source # 
Instance details

Defined in Agentic.Questions

Num Probability Source # 
Instance details

Defined in Agentic.Questions

Fractional Probability Source # 
Instance details

Defined in Agentic.Questions

Show Probability Source # 
Instance details

Defined in Agentic.Questions

toProbability :: Double -> Probability Source #

Convert a provider's probability, rounding once (half to even).

newtype YesNo Source #

Jev's Noul: the probability that the answer is yes.

Constructors

YesNo 

Fields

Instances

Instances details
Contract YesNo Source # 
Instance details

Defined in Agentic.Questions

Eq YesNo Source # 
Instance details

Defined in Agentic.Questions

Methods

(==) :: YesNo -> YesNo -> Bool #

(/=) :: YesNo -> YesNo -> Bool #

Show YesNo Source # 
Instance details

Defined in Agentic.Questions

Methods

showsPrec :: Int -> YesNo -> ShowS #

show :: YesNo -> String #

showList :: [YesNo] -> ShowS #

data Choice a Source #

Constructors

Choice 

Instances

Instances details
Contract a => Contract (Choice a) Source # 
Instance details

Defined in Agentic.Questions

Eq a => Eq (Choice a) Source # 
Instance details

Defined in Agentic.Questions

Methods

(==) :: Choice a -> Choice a -> Bool #

(/=) :: Choice a -> Choice a -> Bool #

Show a => Show (Choice a) Source # 
Instance details

Defined in Agentic.Questions

Methods

showsPrec :: Int -> Choice a -> ShowS #

show :: Choice a -> String #

showList :: [Choice a] -> ShowS #

data Score a Source #

Constructors

Score 

Fields

Instances

Instances details
Contract a => Contract (Score a) Source # 
Instance details

Defined in Agentic.Questions

Eq a => Eq (Score a) Source # 
Instance details

Defined in Agentic.Questions

Methods

(==) :: Score a -> Score a -> Bool #

(/=) :: Score a -> Score a -> Bool #

Show a => Show (Score a) Source # 
Instance details

Defined in Agentic.Questions

Methods

showsPrec :: Int -> Score a -> ShowS #

show :: Score a -> String #

showList :: [Score a] -> ShowS #

Wire types

data QuestionSpec Source #

Constructors

AskYesNo Text 
AskChoice Text [(Text, Maybe Text)]

Option labels with their descriptions.

AskScore Text [(Text, Maybe Text)]

Levels in order, lowest first.

data Answer Source #

Constructors

YesNoAnswer Probability 
ChoiceAnswer Text [(Text, Probability)] Probability

The chosen label, every label's probability, and the confidence.

ScoreAnswer Double [(Int, Probability)] Probability

The position, each level's probability (by index), and the confidence.

Instances

Instances details
Eq Answer Source # 
Instance details

Defined in Agentic.Questions

Methods

(==) :: Answer -> Answer -> Bool #

(/=) :: Answer -> Answer -> Bool #

Show Answer Source # 
Instance details

Defined in Agentic.Questions

data JudgeRequest Source #

What a System One provider receives: the encoded input and the questions.

Constructors

JudgeRequest