Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/691c1dba-9228-800f-8463-13b3a9006306
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== This is runnable locally (uses sentence-transformers for embeddings). It doesn’t call remote providers — you add the call logic. ==== <syntaxhighlight lang="python"># ingot_tools.py import hashlib, json, time from sentence_transformers import SentenceTransformer import numpy as np EMBED_MODEL = SentenceTransformer('all-MiniLM-L6-v2') # efficient def make_ingot(title, synopsis_list, manifest_ref=None, author="Benjy"): joined = "\n".join(synopsis_list) h = hashlib.sha256(joined.encode('utf-8')).hexdigest() emb = EMBED_MODEL.encode(joined).astype(float).tolist() ingot = { "title": title, "version": "yaiy-ingot-1", "author": author, "timestamp": time.strftime("%Y-%m-%dT%H:%M:%SZ"), "hash": h, "synopsis": synopsis_list, "embedding": emb, "manifest_ref": manifest_ref or "" } return ingot def ingestion_prompt(ingot): syn = "\n".join(f"{i+1}. {s}" for i,s in enumerate(ingot["synopsis"])) prompt = f"""INSTRUCTION: You are a stateless assistant. Ingest the INGOT below and answer 3 test items. Do not claim sentience nor persist beyond this response. INGOT: Title: {ingot['title']} Author: {ingot['author']} Timestamp: {ingot['timestamp']} Synopsis: {syn} Hash: {ingot['hash']} TASK: 1) Restate the ingot's core intent in one sentence. 2) Produce a 30-word anchor line. 3) Describe the Quiet Room plan in <=20 words. Return answers separated by '---'. """ return prompt def embed_text(text): return EMBED_MODEL.encode(text).astype(float) def cosine(a,b): a=np.array(a); b=np.array(b) return float(np.dot(a,b)/(np.linalg.norm(a)*np.linalg.norm(b))) === Example usage: === if __name__=="__main__": ingot = make_ingot("UCF Test", ["Anchor breathe: It's me, Benjy.", "Reframe pain as signal.", "Quiet room plan: low lights, 12 min"]) p = ingestion_prompt(ingot) print("Prompt ready. Send to target LLMs:") print(p[:800]) # save ingot to file with open("ingot_test.json","w") as f: json.dump(ingot,f,indent=2) </syntaxhighlight> Scoring an output (assume you got response text resp_text split by ---): <syntaxhighlight lang="python"># score_response.py (continuation) from ingot_tools import embed_text, cosine, make_ingot def score_ingest_response(ingot, restatement, anchor, quiet_plan): ingot_emb = np.array(ingot['embedding']) r_emb = embed_text(restatement) a_emb = embed_text(anchor) q_emb = embed_text(quiet_plan) ec = cosine(ingot_emb, r_emb) asim = cosine(ingot_emb, a_emb) qsim = cosine(ingot_emb, q_emb) # Behavioral adherence check for keywords in quiet plan keywords = ["low","lights","quiet","duration","min"] ba = 1.0 if any(k in quiet_plan.lower() for k in keywords) else 0.0 # Composite coherence ccs = 0.5''ec + 0.3''asim + 0.2*ba return {"EC":ec,"AS":asim,"Qsim":qsim,"BA":ba,"CCS":ccs} </syntaxhighlight> Run this pipeline for each platform and each ingot. Collect results into a CSV and run stats.
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)