Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-24 11:39:04

Hello

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-24 11:39:07

Chris Krecicki [2:13 PM] Setup for transcription project.

  1. New Google Cloud Project (or access to existing one)
  2. Enable Speech-to-Text API in the project
  3. Service Account with these permissions: ◦ Cloud Speech Client (for transcription API) ◦ Storage Object Viewer (to read audio files from buckets) ◦ Storage Legacy Bucket Reader (if using older bucket permissions) Storage Access Needed: • Read access to GCS bucket(s) containing audio files • Bucket name(s) where audio files are stored • File path structure (if files are in specific folders) What I Need from You: • Project ID (the unique identifier for the project) • Service Account JSON key file (for authentication) • GCS Bucket name(s) containing the audio files • File organization info (folder structure, file naming patterns) [2:14 PM] Chris Krecicki

Steps for Admin:

  1. Create/select Google Cloud project
  2. Go to "APIs & Services" → "Library" → Enable "Cloud Speech-to-Text API"
  3. Go to "IAM & Admin" → "Service Accounts" → "Create Service Account"
  4. Assign roles: ◦ "Speech Client" ◦ "Storage Object Viewer" ◦ "Storage Legacy Bucket Reader" (if needed)
  5. Generate and download JSON key file
  6. Ensure service account has access to specific GCS buckets with audio files
  7. Share project ID, JSON key file, and bucket details securely [2:18 PM] Chris Krecicki

Cost runs approximately $0.006 per 15-second increment (very low cost for testing)

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-24 11:40:06

and or I just need a audio file to run a pilot test betweem two different text to speech diarization

Dustin Surwill (dsurwill@shield-legal.com)
2025-06-24 11:41:10
Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-24 13:19:06
Dustin Surwill (dsurwill@shield-legal.com)
2025-06-24 14:33:18

https://dev.to/shayy/postgres-is-too-good-and-why-thats-actually-a-problem-4imc

DEV Community
Dustin Surwill (dsurwill@shield-legal.com)
2025-06-24 14:33:59

https://www.bytebase.com/blog/features-i-wish-mysql-had-but-postgres-already-has/

Bytebase
Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-26 11:45:38

looks like I need to run: echo "sk-proj-kgC52qr0bQyRPKjOXN65hj5oUlYk1c8SC8FaRoEYdB3FGMF3W47r46VEJyCHu0pXC86Vao_OT3BlbkFJCXeoAflB--MhCIgU7m3tYbTr2fDjl1fmlJifo9MWFZuPDNWKMNbe9km8FY4RrrkURQYfdLCzAA" | gcloud secrets create openai-api-key --data-file=-

Dustin Surwill (dsurwill@shield-legal.com)
2025-06-26 11:46:28

or input manually here? https://console.cloud.google.com/security/secret-manager?inv=1&invt=Ab1Kcw&project=shield-legal-tools

accounts.google.com
Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-26 11:58:10

thanks

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-26 13:25:36

OK. So the middleware is blocking me, internal_tools.applications table. The auto-discovery system registered the transcription app when I added the code, but I don't have permissions to access it. Can you add transcription permissions to my user account in the auth system?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-26 13:54:57

There's a bug in auth/middleware.py line 73. The audit logging is trying to JSON serialize request.body which is bytes. It needs to be decoded to string first. Change line 73 from:


python
json.dumps({'body': request.body}

To:


python
json.dumps({'body': request.body.decode('utf-8', errors='replace') if request.body else None}

This will safely decode the bytes to string for JSON serialization. Can I make this change without affecting anything else?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-26 13:55:11

It happens when I try to load the .json file of the chat log into the chat window

Dustin Surwill (dsurwill@shield-legal.com)
2025-06-26 13:56:26

Thats fine

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-26 13:56:33

OK cool

Dustin Surwill (dsurwill@shield-legal.com)
2025-06-26 13:57:01

I hate how python does not default to UTF-8 on windows but does on all other systems

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-26 13:57:22

evil windows, i've spent half my time setting up env and auth stuff

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-26 13:57:23

lol

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-26 14:00:53

The JSON serialization issue is fixed, but now there's a database permissions problem. My user doesn't have permission to insert into the internal_tools.audit_log table. The error is: permission denied for sequence audit_log_id_seq Can you grant INSERT permissions on the audit_log table and its sequence to my database user?

Dustin Surwill (dsurwill@shield-legal.com)
2025-06-26 14:03:28

that should fix it

Dustin Surwill (dsurwill@shield-legal.com)
2025-06-26 15:21:36

lets not include empty files or installers in the repo

Dustin Surwill (dsurwill@shield-legal.com)
2025-06-26 15:22:16

Also your html file does not extend from html/base.html

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-26 15:22:26

hmm what did you see? i only added two files -- yes the head in html, will fix

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-27 15:22:42

Next project, I don't need it asap. But how can I see who was hired within the last 60 days and match them to their recordings so I can grab 10 random intakes spaced over the different campaign. I'll then run them to transcribe, ask it the 3 questions legal wants to know and then it'll email them a report.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-27 15:22:53

Here is what he wants; SOLUTION: In a perfect world, you would be able to write a script for me that would auto select intake conversations from people hired within 60 days. It would select 10 random intakes from each person on that list, spaced evenly over the different campaigns. It would then take each of the selected interviews and run them through the transcription and make check if the three issues above were correctly/incorrectly mentioned. Then the report would pop out and we would see how many issues there were. We would then run the script 2x a month(?) Depending on the cost and time.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-27 15:24:22

A script will do all this on a cron

Dustin Surwill (dsurwill@shield-legal.com)
2025-06-30 17:17:54
🙏 Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-30 19:01:34

thanks dustin

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-30 19:20:15

we should have a github repo with utility files like this connector file you sent me

Dustin Surwill (dsurwill@shield-legal.com)
2025-06-30 19:20:37

Its on my todo list...

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-30 19:20:40

do i have permission to do so, so I don't have to keep it locally for the future?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-30 19:20:49

ill do it real quick

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-30 19:20:58

kids are gaming and I'm bored lol

Dustin Surwill (dsurwill@shield-legal.com)
2025-06-30 19:21:14

You can start it. I will add more helpers tomorrow

🙏 Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-30 20:59:52
Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-30 21:00:04

useful things

👍 Dustin Surwill
Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-30 21:00:30

we should also consider a github repo for the integrations guys so they can share and keep track of templates, changes etc

Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-30 21:00:36

versioning

Dustin Surwill (dsurwill@shield-legal.com)
2025-06-30 21:00:58

My phone is always on. There is a repo for integrations, that's where I grabbed the cloud postgres file from

✅ Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-06-30 21:01:13

ah lol .. just keeping an eye out 🙂

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:03:05

seems tyson is making a new toolbox called slcommonutilities? Looks like hes adding a lot of the same files ... should I abandon my sandbox toolbox and let him take over it?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:03:15

and delete it?

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:03:54

That was me

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:03:58

That wad me

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:04:01

That was me

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:04:17

ah cool -- should i delete my repo i was doing it in?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:04:48

sorry i left a bit early, was in pain

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:05:08

If you want, or you can leave it as your sandbox for some scripts...

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:05:36

OK cool. Sounds good. I didn't want to do double work when I saw it.

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:05:59

I spun up a project locally called untitled that is my local sandbox

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:06:13

nice, i won't touch it

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:06:32

you have an imap file here in py

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:06:54

All the tools in sl-common-utilities are current the sync versions not the async versions. the imap.py file came from the integrations project

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:07:28

It looks like your repo has the async versions since it was probably based on the website

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:07:31

ah this is how you get the emails

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:07:58

yeah i grabbed it from sanic

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:08:19

We will probably roll the async versions in at some point but I want to talk to @Tyson Green about it first

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:09:26

do we have a zapier account?

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:10:45

I know some people have an account, not sure if its shared or a team/org thing. why?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:11:51

figured i could use it to send legal a report without waiting for sendgrid

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:12:03

use zapier to send a gmail with the report

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:12:22

or a script locally on your machine with the application default creds to send as you?

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:12:28

for now at least

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:12:39

ill look into it

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:12:54

i didnt want to have it scheduled running off my laptop

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-02 18:13:23

at least until next week. some things should have calmed down by then

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-02 18:14:03

hehe ill just send it by hand once he gives me feedback on what I sent him earlier, i think a lot of people are mentally already on vacation or are trying to close up work before tomorrow

👍 Dustin Surwill
Dustin Surwill (dsurwill@shield-legal.com)
2025-07-08 11:24:48

I think Nick was more meaning the data from LawRuler / the answers to the questionnaires

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-08 11:25:04

such as standardizing address format...

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-08 11:30:08

i don't believe I have access to that database .. only postgres table five9bulkcalldatatabularv2

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-08 11:30:47

or is it under public

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-08 11:31:09

public is the lr data

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-08 11:31:11

did I give you the ERD?

👍 Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-08 11:31:17

nice

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-08 11:31:18

did I give you the ERD?

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-11 18:35:40

@Chris Krecicki , Lexi is getting the error shown in the below image when trying to transcribe either a .wav or .mp3 file

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-14 11:02:33

https://console.cloud.google.com/run/detail/us-west4/main-site/logs?inv=1&invt=Ab2vog&project=shield-legal-tools

accounts.google.com
Dustin Surwill (dsurwill@shield-legal.com)
2025-07-14 11:05:16

> Alexia O'Brien🦂 [9:04 AM] > 769655,

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-14 13:48:54

request.ctx.user. It contains the following: {'iss': 'https://accounts.google.com', 'azp': '...', 'aud': '...', 'sub': '...', 'hd': '..domain..', 'email': '..email..', 'emailverified': True, 'athash': '...', 'name': '.', 'picture': '..url..', 'givenname': '.', 'familyname': '.', 'iat': 000000, 'exp': 000000} I suggest just using the id, example: request.ctx.user['id']

✅ Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-14 14:45:38

For the tort identifier project cam wants. I'm going to use PostgreSQL instead of LanceDB. As usual, you're right - it is better. I need the following extensions installed to use it as a vector database: • uuid-ossp • pgtrgm • btreegin Can we do this? I didn't want to mess with the DB since I don't think I have superuser privileges. Attached is the table schema I need created - it includes the CREATE EXTENSION statements and everything else needed. It's just one new table called legal_cases that won't affect any existing tables.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-14 15:01:05

OK. For Cameron's tort opportunities. I'm going to use PostgreSQL instead of LanceDB. As usual, you're right - it is better. I need the following extensions installed to use it as a vector database: • uuid-ossp • pgtrgm • btreegin Can we do this? I didn't want to mess with the DB since I don't think I have superuser privileges. Attached is the table schema I need created - it includes the CREATE EXTENSION statements and everything else needed. It's just one new table called new_tort_opportunities that won't affect any existing tables. Attached is the SQL file with everything that needs to be done.

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-16 12:12:46

https://hub.docker.com/_/postgres#-via-docker-compose

hub.docker.com
✅ Chris Krecicki
Dustin Surwill (dsurwill@shield-legal.com)
2025-07-21 11:51:18
Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-24 15:58:03

83773

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-24 16:57:09

https://youtu.be/T17bpGItqXw?si=xC7e33Bf345-mYz0

YouTube
Level1Techs (https://www.youtube.com/@Level1Techs)
🙏 Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-24 16:58:41

boss we need one of these in the office with us

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-25 11:18:50

https://console.cloud.google.com/storage/browser/sl-five9-recordings;tab=permissions?forceOnBucketsSortingFiltering=true&inv=1&invt=Ab3tkg&project=tort-intake-professionals&prefix=&forceOnObjectsSortingFiltering=false|https://console.cloud.google.com/storage/browser/sl-five9-recordings;tab=permissions?forc[…]ofessionals&prefix=&forceOnObjectsSortingFiltering=false

accounts.google.com
Dustin Surwill (dsurwill@shield-legal.com)
2025-07-25 11:23:56
Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-25 14:25:58

Outside of permission I just dont know

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-25 14:27:02

We've reviewd: network log comparisons from a successful computer and non-sucessful, we've compared logs from GCP, we went over the middleware files for auth. The only thing that make since is a firewall or permissions error.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-25 14:27:41

All my work on this so far to scroll through https://claude.ai/share/04b96ea8-b8ee-42e8-b658-0adb1c3308a0

claude.ai
Dustin Surwill (dsurwill@shield-legal.com)
2025-07-25 14:27:43

Table it. Next week

🙏 Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-25 14:27:47

has all the logs etc

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-25 14:27:55

yes sir

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-25 14:28:03

njoy your sandwich

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-28 14:09:53

done 👀 i sent via email

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-29 11:08:58

That new link still has 92k rows without a leadid, only 799 rows have a leadid

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-29 11:11:45

Sorry, my mistake, I was looking at the wrong column

✅ Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-29 11:12:02

Whatever you need just ask

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-29 11:12:20

I got you. I'm working out the migration stuff right now

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-29 12:18:21

Firefighting Foam - DL - Flatirons

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-29 12:22:41
Dustin Surwill (dsurwill@shield-legal.com)
2025-07-31 13:08:05

No email sent: 801452

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-31 13:11:54
Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-31 13:15:06
Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-31 14:03:37

```-- Find leads with final/declined status that have NO attorney emails -- This identifies true "System Failure" cases

SELECT l.id AS leadidnoattorneyemails, ct.name AS campaignname, ls.name AS statusname, l.createdate, 'System Failure - No Attorney Emails' AS issuetype FROM lead l JOIN casetype ct ON l.casetypeid = ct.id JOIN leadstatus ls ON l.statusid = ls.id WHERE ls.id IN (1074, 1075) -- Final or declined status AND l.createdate >= '2022-01-01' -- Recent data AND l.id NOT IN ( -- Exclude leads that DO have attorney emails SELECT DISTINCT lh.leadid FROM lead_history lh WHERE ( -- Check for ANY of the 110 attorney domains lh.username LIKE '%@800goldlaw.com%' OR lh.username LIKE '%@aaronlawgroup.com%' OR lh.username LIKE '%@actslaw.com%' OR lh.username LIKE '%@openjar.com' OR lh.username LIKE '%@alexwalshlaw.com%' OR lh.username LIKE '%@amirianlawgroup.com%' OR lh.username LIKE '%@anapolweiss.com%' OR lh.username LIKE '%@antheminjurylaw.com%' OR lh.username LIKE '%@asilpc.com%' OR lh.username LIKE '%@askllp.com%' OR lh.username LIKE '%@aswtlawyers.com%' OR lh.username LIKE '%@attorney4life.com%' OR lh.username LIKE '%@attorneyrobertwoods.com%' OR lh.username LIKE '%@awkolaw.com%' OR lh.username LIKE '%@babinlaws.com%' OR lh.username LIKE '%@baileyglasser.com%' OR lh.username LIKE '%@bbtrial.com%' OR lh.username LIKE '%@beasleyallen.com%' OR lh.username LIKE '%@bencrump.com%' OR lh.username LIKE '%@benefitshealth.com%' OR lh.username LIKE '%@bighornlaw.com%' OR lh.username LIKE '%@bowersoxlaw.com%' OR lh.username LIKE '%@bradleygrombacher.com%' OR lh.username LIKE '%@bradmorrislawfirm.com%' OR lh.username LIKE '%@burgsimpson.com%' OR lh.username LIKE '%@christophergolden.org%' OR lh.username LIKE '%@cochrantexas.com%' OR lh.username LIKE '%@collinslaw.com%' OR lh.username LIKE '%@coopermasterman.com%' OR lh.username LIKE '%@cpialaw.com%' OR lh.username LIKE '%@dawsonmedlocklaw.com%' OR lh.username LIKE '%@douglasandlondon.com%' OR lh.username LIKE '%@dsbcllc.com%' OR lh.username LIKE '%@elglaw.com%' OR lh.username LIKE '%@extralegalhelp.com%' OR lh.username LIKE '%@fabianlawfirm.com%' OR lh.username LIKE '%@federmanlaw.com%' OR lh.username LIKE '%@fitzpatrickfirm.com%' OR lh.username LIKE '%@fleischnerlawfirm.com%' OR lh.username LIKE '%@flknjlaw.com%' OR lh.username LIKE '%@fortlauderdaletriallaw.com%' OR lh.username LIKE '%@fraserlawfirmllc.com%' OR lh.username LIKE '%@goldbergkohn.com%' OR lh.username LIKE '%@goldeninjurylaw.com%' OR lh.username LIKE '%@greene-phillips.com%' OR lh.username LIKE '%@guyratner.com%' OR lh.username LIKE '%@herrmanlaw.com%' OR lh.username LIKE '%@hrnjlaw.com%' OR lh.username LIKE '%@injurylaw.com%' OR lh.username LIKE '%@injurylawyers.com%' OR lh.username LIKE '%@jeanlawfirm.com%' OR lh.username LIKE '%@jllawfirm.net%' OR lh.username LIKE '%@johnbales.com%' OR lh.username LIKE '%@josephryancpa.com%' OR lh.username LIKE '%@kennedylaw.net%' OR lh.username LIKE '%@kline-specter.com%' OR lh.username LIKE '%@koenigfirm.com%' OR lh.username LIKE '%@kornbluthlaw.com%' OR lh.username LIKE '%@landaverde-law.com%' OR lh.username LIKE '%@law-lls.com%' OR lh.username LIKE '%@law-rm.com%' OR lh.username LIKE '%@lawfirm4you.com%' OR lh.username LIKE '%@lawkb.com%' OR lh.username LIKE '%@lawrenceadler.com%' OR lh.username LIKE '%@lawyerseattle.com%' OR lh.username LIKE '%@lexlaw.com%' OR lh.username LIKE '%@lieffcabraser.com%' OR lh.username LIKE '%@lopezlaw.com%' OR lh.username LIKE '%@lpfllp.com%' OR lh.username LIKE '%@marlerclark.com%' OR lh.username LIKE '%@martindale.com%' OR lh.username LIKE '%@mctlaw.com%' OR lh.username LIKE '%@miaminursinghomelaw.com%' OR lh.username LIKE '%@mmalaw.com%' OR lh.username LIKE '%@mnoglaw.com%' OR lh.username LIKE '%@morganlaw.com%' OR lh.username LIKE '%@morganmorganpa.com%' OR lh.username LIKE '%@moseleycollins.com%' OR lh.username LIKE '%@mundylaw.com%' OR lh.username LIKE '%@napolilaw.com%' OR lh.username LIKE '%@nelsonlaw.com%' OR lh.username LIKE '%@ohioemploymentlaw.com%' OR lh.username LIKE '%@onderlaw.com%' OR lh.username LIKE '%@owenslaw.com%' OR lh.username LIKE '%@parmelelaw.com%' OR lh.username LIKE '%@peckarlaw.com%' OR lh.username LIKE '%@philipslaw.com%' OR lh.username LIKE '%@purcellkrug.com%' OR lh.username LIKE '%@rheingoldlaw.com%' OR lh.username LIKE '%@robinslawoffices.com%' OR lh.username LIKE '%@ryanlaw.com%' OR lh.username LIKE '%@sairamlaw.com%' OR lh.username LIKE '%@sgghlaw.com%' OR lh.username LIKE '%@simmonsfirm.com%' OR lh.username LIKE '%@strausslaw.com%' OR lh.username LIKE '%@stuartandstuart.com%' OR lh.username LIKE '%@tampanursinghomelaw.com%' OR lh.username LIKE '%@teichmanlaw.com%' OR lh.username LIKE '%@thaddeusculley.com%' OR lh.username LIKE '%@theblumfirm.com%' OR lh.username LIKE '%@thelegaladvocate.com%' OR lh.username LIKE '%@theschifferlaw.com%' OR lh.username LIKE '%@turleylawfirm.com%' OR lh.username LIKE '%@waldmancerny.com%' OR lh.username LIKE '%@walterclark.com%' OR lh.username LIKE '%@weitzlux.com%' OR lh.username LIKE '%@wilsonlaw.com%' OR lh.username LIKE '%@yourlawyer.com%' OR lh.username LIKE '%@yourvaccinelawyer.com%' OR lh.username LIKE '%@zimmreed.com%' ) ) ORDER BY ct.name, l.createdate DESC;```

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-31 14:58:17

It works. I have a handful of people using it now.

Dustin Surwill (dsurwill@shield-legal.com)
2025-07-31 15:04:21

What works?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-31 15:06:56

the transcription thing

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-31 15:07:06

i have about 12 people on the floor using it

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-31 15:07:14

going to be showing brooke ghannon and a few others soon

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-31 15:23:47

So I was thinking on the issue with the automation for pulling these "did not send emails" -- we could have a new table called attorney_domains -- and we can get a list of all the automation, etc emails and have an automation that looks for new emails and adds them if they NOT LIKE.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-07-31 15:23:49

just an idea

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-01 15:50:12

Lets stop sending Github links unless you know that everyone is on github and has access to that repo. Just send the file. If you expect to update the file later then use Google Drive

✅ Chris Krecicki
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-01 15:51:01

Also most people do not require 2 pings (email + slack)...

✅ Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-01 16:03:06

Sounds good

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-04 13:29:05

Amidayne Nelsen/2025/07/29/16-52-15 5594102415.mp3: you need a private key to sign credentials.the credentials you are currently using <class 'google.oauth2.credentials.Credentials'> just contains a token. see https://googleapis.dev/python/google-api-core/latest/auth.html#setting-up-a-service-account for more details.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-04 14:52:57

OK. Everything is working, finally. The only issue is I don't have permissiosn to upload to the bucket, these transcribed json files, they have the same filename as the audio just with .json at the end

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-04 19:03:42

Permission given. Can we get a SQL query that shows the record/transcript path/url to make as a view in the DB?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 10:20:12

yeah we can do that what table? or should i make a new one? What should we use as a key for the table? I just got in I'll see you soon

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:03:13

CREATE TABLE IF NOT EXISTS transcriptions ( id SERIAL PRIMARY KEY, audio_file_path TEXT NOT NULL, transcription_json_path TEXT, bucket_json_path TEXT, status VARCHAR(20), created_at TIMESTAMP DEFAULT NOW(), completed_at TIMESTAMP, file_size BIGINT, duration_seconds INTEGER, error_message TEXT, assemblyai_id TEXT );

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:03:43
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:14:14
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:14:22

All done and tested and checked

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:14:31

also it looks like were uploading to gcs

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-05 11:26:06

That query only creates the table, what about one that generates the paths using SQL dynamically?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:30:07

To dynamically generate the full GCS URLs? And not just the paths?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:33:08

CREATE VIEW transcriptionfilepaths AS SELECT id, audiofilepath, '' || audiofilepath as audiourl, '' || REPLACE(audiofilepath, '.mp3', '.json') as expectedtranscriptionurl, status, createdat FROM transcriptions;

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:34:42

the views looks like this

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-05 11:36:02

But the transcriptions table is a local table to you. Can this work from the five9.five9_bulk_call_data_tabularv2?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:37:53

i can add these columns to the five9.five9bulkcalldatatabularv2 and the views. I do not believe I have write access. Only read.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:38:11

i just made this local db for testing

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-05 11:55:36

what code did you use to generate the audiofilepath?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:56:48
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:57:02

everything works perfectly -- finds files correctly etc

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:57:39

it generates this

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 11:58:26

this is the file doing all the work once I have the depoproverafilenames.json

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 13:45:29
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 13:45:36

first time since GPT-2 they did this

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-05 15:16:48
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-05 17:08:05

how does your code handle when there are multiple recordings for the same call? ex: row['recordings']='10:33:32(0:35) 10:34:16(0:31) 10:34:54(0:21)'

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 09:24:09

it is based on the time stamp so it shouldn't interfere

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 09:24:18

they should all be unique

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 09:25:00

what do you think? that's my imagination considering things

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-06 11:06:29

```# Extract time from recordings field (format: "HH:MM:SS(duration)") recordingstime = row['recordings'] if recordingstime and isinstance(recordingstime, str): timematch = recordingstime.split('(')[0] # Get "HH:MM:SS" part hour, minute, second = timematch.split(':')

    # Add 7 hours to match actual filename timezone
    hour_int = int(hour) + 7
    if hour_int &gt;= 24:
        hour_int -= 24
        # If we roll over to next day, increment the date
        base_timestamp += pd.Timedelta(days=1)
else:
    # Fallback to timestamp_millisecond if recordings field is missing
    timestamp = base_timestamp + pd.Timedelta(hours=7)
    hour = f"{timestamp.hour:02d}"
    minute = f"{timestamp.minute:02d}"
    second = f"{timestamp.second:02d}"
    hour_int = timestamp.hour```

recordings_time can hold multiple like I showed yesterday

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 11:26:26

yes but when I look at the filenames for download and someones name shows multiple times "Nastashia Friday/2025/07/25/21-35-57 4243394108.mp3", "Nastashia Friday/2025/07/25/20-30-23 5013924661.mp3", "Nastashia Friday/2025/07/25/20-19-58 4793525654.mp3",

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 11:26:35

there is no duplicate time stamps

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 11:26:40

theyre all unique

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 11:27:02

if you look at depoproverafilenames.json

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-06 11:31:22

I was thinking about converting the generate_filename function to SQL. I cannot find the code that gets the rows from five9.five9... . If we use the rows from the table then we need to account that 1 call record can turn into multiple recordings

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 11:32:40

everything works perfectly right now

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 11:33:13

run the query, makes a csv, i run a file to build file paths, the script uses those file paths to download and transcribe, insert to db table i made, uploads to gcs

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 11:33:37

run the query, makes a csv, i run a file to build file paths, the script uses those file paths to download and transcribe, uploads to gcs

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 11:34:26

its flawless right now

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 11:34:38

run the query, makes a csv, i run a file to build file paths, the script uses those file paths to download and transcribe, add to db table i made, uploads to gcs

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 11:34:51

run the query, makes a csv, i run a file to build file paths, the script uses those file paths to download and transcribe, insert to db table i made, uploads to gcs

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 15:38:06

i just did something for josh to auto fill questions with an LLM -- I can make a new script to globally do dummy data fills. The reason I took a hardcoded approach in the file you were referring to regarding lr_question.csv is it would cost 100's of API calls and we only have 10,000 per day. We do have gpt-oss now though and structured output support and we could do it locally. We need a local server or computer running a reverse proxy so we can hit its endpoint running on ollama. It would be a huge win for us.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 15:38:17

Consider. I'll approach Joe about it.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 15:38:53

Or we can just do it ourselves. But that would be hella expensive considering the container costs you were showing me and we need well over 16GB of RAM

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-06 16:39:08

*Thread Reply:* Can we find a smaller local model that can it?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 16:55:13

*Thread Reply:* thats the smallest model that openai has open sourced that was trained to do structured data -- josh is looking into this topic as we speak

👍 Dustin Surwill
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-06 15:39:26

Stop bugging joe I will look soon

:lol: Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 15:39:46

sounds good dustin lmk

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-06 16:38:48

Did the medilens stuff come from @James Scott?

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-06 16:43:40

*Thread Reply:* If so, I feel like it should have been a separate branch/PR with the inital code he gave you then any changes

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 16:51:37

*Thread Reply:* its all in my branch

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 16:51:59

*Thread Reply:* yeah

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 16:52:50

*Thread Reply:* well he only gave me a chopped up version of your app with a ton of technical debt, left over files, using an env, didnt async and load bigquery data later .. the list goes on

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 16:53:49

*Thread Reply:* i spent the entire day taking what he had a fixing all of that and making it work for our actual sanic setup

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 17:02:18

*Thread Reply:* it was not worth sharing his code

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 17:03:06

*Thread Reply:* he has it in his own github if you want me to pull it and send it to you

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-06 17:14:23

*Thread Reply:* ok

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 16:53:11

well he only gave me a chopped up version of your app with a ton of technical debt, left over files, using an env, didnt async and load bigquery data later .. the list goes on

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 17:19:27

Please remove the tort-finder route from the db it is called Predator now. When I pushed to main in the past, it updated the db it looks like with that route and now it shows in the nav.

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-06 17:21:06

The folder in the code is still called tort-finder in the code on your branch. Until that is updated it will constantly come back

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 17:21:35

i know, i havent pushed the next updates yet with that change, but it is done locally

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-06 17:22:01

once it is updated in github, I will fix the table

✅ Chris Krecicki
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-06 18:08:14

db updated

✅ Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 18:08:32

❤️

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 18:08:34

thanks dustin

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 18:08:37

it was so ugly

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-06 18:08:51

i will never push to main again, i apologize again

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-08 00:31:14

https://youtu.be/N5xhOqlvRh4?si=g2I5Qgg7X3TE6T

YouTube
Jeff Geerling (https://www.youtube.com/@JeffGeerling)
🔥 Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-08 09:57:33

yeah llama.cpp the guy who made that is physicist and made it in his free time

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-08 09:57:50

its a pretty incredible project ... microsoft actually ripped him off and made a 1-bit version

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-08 09:58:05

really annoying to see they did that but that is their history right?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-08 10:33:25

oh man that really took a dive on performance splitting the load didn't expect that, i never had watched one of these cluster videos but i didn't expect it to be like this

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-08 10:34:18

so single vertically scaled versus clustering is the way to go with these

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-08 10:34:36

i wonder why he couldnt even get the big models to load without rpc approach

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-08 11:03:28

i still think back propagation is the most interesting part of all of this an updating embedding dimensions (weights)

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-08 11:06:15

i still think back propagation is the most interesting part of all of this an updating embedding dimensions (weights)

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-09 16:35:42

https://www.infoq.com/news/2025/08/google-langextract-python/

InfoQ
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-11 11:22:46

@Dustin Surwill google has to catch up .. neat package i am reading over it

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-11 12:07:13
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-11 17:25:22

I've tested these locally. If anything does come up, it'll be a simple change. I don't forsee any issues though.

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-14 00:19:22

https://youtu.be/Qvx2sVgQ-u0?si=rqPdLRGAHLIxqVvq

YouTube
NetworkChuck (https://www.youtube.com/@NetworkChuck)
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-15 11:31:33

https://www.scrapy.org/

scrapy.org
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-15 12:36:39

Can you make an agent that takes a payload.json file and checks for some of the logic in this file? https://docs.google.com/document/d/18orS2h5giBLjlnZopWlt7IfcUJ60QiV2/edit

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-15 12:37:34

You give comments of the google doc file to make it better for an agent

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-15 12:41:15

yes sir, let me finish up this defendant cluster tab in predator

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-15 15:37:41

AND document_response NOT ILIKE ANY(ARRAY['%test-%','%tester-%','%mock-%','%-test%','%-mock%'])

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-15 15:40:21

postgres.query('SELECT lawrulerfield, answer, leadid FROM lead_question_lawruler WHERE leadid=ANY(%s)', (lead_ids,))

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-15 15:45:14

Wikipedia (https://en.wikipedia.org/)
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-16 10:53:54

https://github.com/shield-legal/internal-tools-site/pull/16 -- After two hours of dealing with asyncpg.exceptions._base.InterfaceError: cannot perform operation: another operation is in progress while making these concurrent, I found this issue MagicStack/asyncpg#738 - turns out you can't run multiple queries concurrently on a single PostgreSQL connection due to the protocol itself. I've optimized the main bottlenecks (control panel, chart data, chat assistant) by using separate connections from the pool for concurrent queries, but kept the rest sequential to avoid overcomplicating things.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-16 10:54:02

See you Monday

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-18 12:38:15
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-18 12:43:40

Looks good

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-19 16:09:54

How did you get the leadids for the contactids in the data import

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-19 16:21:10
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 09:41:48

i matched the contactids with the leadids

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 09:59:33

i responded in the other chat

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 09:59:44

i am still not sure how this small subset got messed up

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 10:15:00

Like for this one newcontactid,leadid,oldcontactid 642216,576856,642238

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 10:15:16

in the last file upload (had to split them up)

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 10:15:35

LeadID 576856 also shows 642238 for the contactID

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 10:16:00

where do you see new_contactid 642216

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 10:16:29

For that contact id of 642216 I have leadid 750465

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 10:17:51

I do see where address1 got the shifted values

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 10:18:19

Whats so weird is it only did it to the last file it looks like

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 10:20:13

this is the file I used -- only the last file had this issue with the columns, the others are fine

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 10:20:22

005

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-20 10:22:09

Can you spot check the lead id / contact ID in the file i sent in the other chat then import it?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 11:20:52

Yes. Also, it looks like when it hit line 84736, For some reason when it got to that line the address was 5800 Dr .. script must have got confused and existingdf = pd.readcsv(outputfile) _# Reads corrupted structure newdf = pd.DataFrame(batchresults) # New data in wrong format combineddf = pd.concat([existingdf, newdf]) combineddf.tocsv(outputfile, index=False) # Saves broken structure

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 11:20:59

I'll match these up now

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 11:21:21

the diff.csv?

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-20 11:21:52

No: address8-18corrected.csv

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 11:22:11

got it

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-20 11:22:21

diff.csv just shows which had bad lead ids (almost all)

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 11:22:47

gotcha -- doing it now

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-20 11:22:50

I used the correct_leads function in this file

✅ Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 11:23:17

ill do a spot check on these

👍 Dustin Surwill
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 11:23:43

Sorry dustin, ill make sure to not assume next time, what a weird bug

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 11:23:55

never crossed my mind that would happen

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 11:23:59

that far downline

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-20 11:45:00

Import it

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 11:45:10

got it

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 16:12:10
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-20 16:47:05

I dont think you need the cost, five9 data, leadspedia data (planned to be postgres). The only table you might need if you need the related firms per case type is the pctid_v2

✅ Chris Krecicki
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-20 16:48:26

I suggest starting with the smallest amount of tables / columns then slowly adding as nessessary

🙏 Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 18:23:46

I need access to the specific BigQuery table tort-intake-professionals.<a href="http://tip_prod_application.io">tip_prod_application.io</a>_tip_lr_status_rates. I can access BigQuery but get permission denied on this table.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-20 18:25:26

I am using this. I know its async. I'll strip it out later.

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-20 19:49:47

permissions fixed

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-21 11:14:13
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-21 11:33:28

Error occurred: 403 POST https://bigquery.googleapis.com/bigquery/v2/projects/tort-intake-professionals/queries?prettyPrint=false: Access Denied: Table tort-intake-professionals:tipprodapplication.iotiplrstatusrates: User does not have permission to query table tort-intake-professionals:tipprodapplication.iotiplrstatusrates, or perhaps it does not exist.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-21 11:33:30

any idea?

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-21 11:34:30
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-21 11:35:34

What do you see here? https://console.cloud.google.com/bigquery?project=tort-intake-professionals&ws=!1m4!1m3!3m2!1stort-intake-professionals!2stip_prod_application

accounts.google.com
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-21 11:37:37
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-21 12:03:25

Almost there ... I need the BigQuery Job User role (or BigQuery User role) on the tort-intake-professionals project to run queries. Currently I can see the data but can't execute queries because I'm missing the bigquery.jobs.create permission.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-21 12:16:23

Let me know when I have this .. still doesn't look like it works, same error -- when you have time

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-21 12:16:24

thank you

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-21 12:19:21

updated

✅ Chris Krecicki
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-21 12:58:50
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-21 12:59:52

thank you

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-21 14:14:22

You should use the same logic that is in @James Turner code. (The SQL above)

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-21 14:17:45

It looks like theyre using -- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- -- Latest status snapshot -- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- latest_status AS ( SELECT leadid, tostatus, ROW_NUMBER() OVER (PARTITION BY leadid ORDER BY status_change_timestamp_PST DESC) AS rn FROM lead_status_history ),

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-21 14:17:57

Not the earliest

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-21 14:18:40

They use CURRENT status to determine if billable, not earliest, can you confirm because that's what it looks like in James quries.

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-25 12:12:07

139 campaigns currently open

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-25 13:06:51

Ryan just changed his mind again on how this will work. I guess we're just doing this for hard validation for now versus for questions actually make sense to the answer.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-25 13:07:00

Thanks for helping with this.

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-25 17:49:34

check this out https://groq.com

Groq
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-25 17:49:56

im going to give this a whirl, i can use the same llama3.1:8b model but it does inference at 800+ t/s

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-25 17:49:58

insane

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-25 17:50:08

ever heard of it?

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-25 19:34:34

No

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-26 11:25:39

You OK?

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-26 11:25:54

Yes? In Ward's office...

✅ Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-26 11:26:01

Ah didn't see your car

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-26 18:46:47

In reply to your email last night, we can update the questions via the LR API...

✅ Chris Krecicki
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-27 11:12:37

If we do that, will update the same answer field though or can we move the old answer to a new column called "old answer"

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-27 11:12:38

or something

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-27 11:13:32

same field. can mostly use lead_history for old answer

✅ Chris Krecicki
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-27 15:38:34
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-27 18:07:58

Is his stuff in bigquery?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-28 11:13:38

yeah i hit him up for his info and table names

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-28 11:45:34

bigquery does not require his credentials, just yours or a service account

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-28 15:04:54

pctid

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-28 15:06:38
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 11:09:47

Just delete both of them and Ill do it over with the correct naming

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-29 12:00:36

done

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 15:04:26

Ryan gave you admin. LMK once you copy those tables over. I'll get to work on refactoring bigquery out and updated with postgres queries

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 15:05:08
Dustin Surwill (dsurwill@shield-legal.com)
2025-08-29 15:41:46

https://youtu.be/-WB0T0XmDrY?si=b_U-Y06YG8qxVNsh

YouTube
ArjanCodes (https://www.youtube.com/@ArjanCodes)
Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 15:52:00

lmk when those bigquery stuff is done .. by Tuesday plz

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-29 15:53:54

I am only seeing tables in the drug_model dataset. All 119 tables?

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-29 15:54:35

also a JS function in SQL?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 15:54:58

you know what i can't even see the tables in the schemas

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 16:02:00

drugmodel.integtestdrugrankingllmrecommendation --- drugmodel.productionclinicaltrial --- kestraadverseeventsranking --- jupyteradverseevents_ranking

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 16:02:02

those 4

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-29 16:02:44

Can I put them in ai_tools schema?

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 16:02:44

yeah all in drug_model

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 16:02:50

yeah

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 16:02:57

that would make sense

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-29 16:07:05

jupyter_adverse_events_ranking imported to jupyter_adverse_events_ranking: 4,884 rows (3 sec, 854 ms, 1628 rows/s)

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-29 16:07:12

production_clinical_trial imported to production_clinical_trial: 10,177 rows (15 sec, 461 ms, 678 rows/s)

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-29 16:07:19

kestra_adverse_events_ranking imported to kestra_adverse_events_ranking: 10,059 rows (4 sec, 131 ms, 2515 rows/s)

Dustin Surwill (dsurwill@shield-legal.com)
2025-08-29 16:07:25

integ_test_drug_ranking_llm_recommendation imported to integ_test_drug_ranking_llm_recommendation: 4,714 rows (8 sec, 444 ms, 589 rows/s)

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 16:07:29

❤️

Chris Krecicki (ckrecicki@shield-legal.com)
2025-08-29 16:50:52

To properly fix the MediLens application, you need to address these specific issues:

  1. Data Quality IssuesClinical trial JSON data is completely unusable - the score_results column contains malformed BigQuery export format • Column name truncations break queries and make maintenance difficult • Inconsistent naming conventions (hyphens vs underscores) require special quoting
  2. Immediate Fixes NeededUpdate all column references in your queries to match the truncated PostgreSQL names • Remove or fix the clinical trial score parsing since that data is corrupted • Add proper error handling for missing columns
  3. Medium-term SolutionsClean migration of the clinical trial data - properly parse the BigQuery JSON into usable PostgreSQL JSONB • Standardize column names - create consistent naming without truncation • Data validation scripts to verify data integrity
  4. What's Actually Broken Right Now • The ranking query fails on column name mismatches • The clinical trial query fails on malformed JSON parsing • The statistical analysis features don't work due to corrupted score data • Any new features that rely on the detailed medical coding will break The quick fix I provided will get your dashboard working, but you're missing significant functionality. The clinical trial statistical analysis (confidence intervals, hazard ratios, etc.) is completely broken due to the data corruption during migration. You should decide whether to:
  5. Accept reduced functionality and move forward
  6. Re-migrate the data properly to restore full features
  7. Clean up the existing data with transformation scripts