OceanQa

marola.knowledge.OceanQa
object OceanQa

"Ask the ocean": retrieve the top passages for a question, then have the local model answer only from them, citing [n].

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
OceanQa.type

Members list

Type members

Classlikes

final case class Answer(text: String, passages: List[Passage], safety: Boolean)

safety is true iff any retained passage came from knowledge/safety/ (MIP-0022) — computed once from retrieval, independent of which passage's text the model actually cited, so a strict-mode abstention on a safety question still carries the footer.

safety is true iff any retained passage came from knowledge/safety/ (MIP-0022) — computed once from retrieval, independent of which passage's text the model actually cited, so a strict-mode abstention on a safety question still carries the footer.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
enum Fallback

Strict: below minScore (or nothing retrieved) → abstain with NoPassagesReply.

Strict: below minScore (or nothing retrieved) → abstain with NoPassagesReply.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def answer(question: String, store: KnowledgeStore, llm: LlmClient, k: Int = ..., fallback: Fallback = ..., minScore: Double = ...): Answer < Sync
def buildMessages(question: String, passages: List[Passage]): List[ChatMessage]
def generalMessages(question: String): List[ChatMessage]

The "manual prompt" baseline — also what just benchmark compares marola against.

The "manual prompt" baseline — also what just benchmark compares marola against.

Attributes

def saysNoAnswer(reply: String): Boolean

True for the sentinel and for the free-text ways small models say the same thing.

True for the sentinel and for the free-text ways small models say the same thing.

Attributes

Concrete fields

val DefaultMinScore: Double

Cosine score under which the best passage is treated as "not about this".

Cosine score under which the best passage is treated as "not about this".

Attributes

val GeneralKnowledgeLabel: String
val NoAnswerSentinel: String

What the grounded prompt asks the model to reply when the passages don't cover the question.

What the grounded prompt asks the model to reply when the passages don't cover the question.

Attributes

val NoPassagesReply: String