Using langchain to interview myself about my skills

Premise Ok, got this half baked idea , combine my #brag-document with the available [[langchain]] QA chains into a proof of concept maybe I can call [[langchain interview me 2023-feb]] So I’m going to throw a bunch of my source material together, language based, accessible as plain text doc, and then I will run the Link examples that provide references, citations, Ok, so for accumulating my information, import yaml import tempfile from pathlib import Path from datetime import datetime import pytz def utc_now(): return datetime.utcnow().replace(tzinfo=pytz.UTC) def utc_ts(dt): return dt.strftime("%Y-%m-%dT%H%M%S") def read_yaml(loc): with open(loc) as fd: return yaml.safe_load(fd) from pathlib import Path import os repos_dir = Path(os.getenv("REPOS_DIR")) assert repos_dir.is_dir() experience_loc = repos_dir / "my-challenges-and-accomplishments/experience.yaml" experiences_dict = read_yaml(experience_loc)["Descriptions"] sections = [] for project, detail in experiences_dict.items(): section = "" if detail.get("company"): company = detail.get("company") section = (f"When I worked at {company}, " f"there was a project in {detail['year']}, {project}.") elif detail.get("project"): project = detail.get("project") section = f"In {detail['year']}, I had a side project, {project}. " section += ". ".join([x for x in detail.get("one-liners", [])]) section += ". ".join([x for x in detail.get("stories", [])]) sections.append(section) workdir = repos_dir / "2023-interview-me" path = workdir / f"{utc_ts(utc_now())}-the-story-blurb.txt" path.write_text("\n\n\n".join(sections)) Ok let me run now some of the basic question answer chains Use my environment from before, ...

February 18, 2023 · (updated February 26, 2023) · 5 min · 985 words · Michal Piekarczyk