marola.knowledge

Members list

Type members

Classlikes

object Corpus

The corpus is a directory of Markdown files (knowledge/ at the repo root by default), plus a safety/ subdirectory (MIP-0022) for documents whose answers must always carry the emergency footer.

The corpus is a directory of Markdown files (knowledge/ at the repo root by default), plus a safety/ subdirectory (MIP-0022) for documents whose answers must always carry the emergency footer.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Corpus.type
final case class CorpusChunk(docTitle: String, source: String, text: String, safety: Boolean = ...)

One indexable unit: a paragraph-ish slice of a corpus document, with the document's provenance.

One indexable unit: a paragraph-ish slice of a corpus document, with the document's provenance.

Attributes

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

Turns text into vectors.

Turns text into vectors.

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class FileKnowledgeStore(corpusDir: String, indexPath: String, embedder: Embedder) extends KnowledgeStore

Local-first RAG index: embeds every corpus chunk once, stores the vectors as JSON under ./data/, and re-embeds only when the corpus or the embedding model changes (a fingerprint of file names, sizes, mtimes and the model name).

Local-first RAG index: embeds every corpus chunk once, stores the vectors as JSON under ./data/, and re-embeds only when the corpus or the embedding model changes (a fingerprint of file names, sizes, mtimes and the model name).

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Retrieval over marola's curated marine-knowledge corpus (the Markdown files under knowledge/) — the RAG half of FUTURE-WORK.md §9.1, local-first.

Retrieval over marola's curated marine-knowledge corpus (the Markdown files under knowledge/) — the RAG half of FUTURE-WORK.md §9.1, local-first.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object OceanQa

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

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

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
OceanQa.type
final case class Passage(docTitle: String, source: String, text: String, score: Double, safety: Boolean = ...)

A retrieved chunk with its provenance — source is the URL the corpus document cites.

A retrieved chunk with its provenance — source is the URL the corpus document cites.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object SafetyFooter

The emergency footer marola appends to any answer grounded in a knowledge/safety/ document (MIP-0022).

The emergency footer marola appends to any answer grounded in a knowledge/safety/ document (MIP-0022).

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type