Sourcing Engine [Alpha 1️⃣]

Added by Justin Sheehan Justin S. June 13, 2025 1:44am
Column
Done July 13, 2025 2:01am
Assigned to
Troy Pastoral Troy P.
Due on
Jun 25, 2025
Notes
Three Levels of Tags
  • Domain: Character, Chemistry, Competency
  • Sub-domain
  • Category
Project Smart Categories - Data - Doden Bot

UI / UX of sidebar Source Module
  • Title: Sources
  • Three Levels of Tags
  • Links to Sources: Articles / PDFs
  • If possible, direct excerpts from Sources
Subtasks
Create design UI for source modal Troy Pastoral Troy P. Jun 18, 2025
Fix multiple source bug Troy Pastoral Troy P. Jun 20, 2025
Only referenced sources for that particular chat Troy Pastoral Troy P.
Update the tag system to include and display Domain, Subdomain, and Category (list here) Troy Pastoral Troy P.
Google Drive vs Pinecone for PDF hosting Troy Pastoral Troy P.
Verify Edge Function that generates RAG
Upload documents and test accuracy
See previous comments
Justin Sheehan
Justin Sheehan Chief Journey Officer June 17, 2025 4:49am June 17, 2025 4:49am
Troy I've tried everything and I can't quite get it the look.

Here is my prompt:
UI / UX of sidebar Source Module
Title: Sources
Three Levels of Tags (make each level of tag a different color, also tags are not exclusive so there can be multiple tags for each source message.)
• Domain: Character, Chemistry, Competency
• Sub-domain: Identity & Purpose, Overcoming Limiters, Teamwork, Problem Solving, Planning & Execution, AE Specific Planning & Execution
• Category: see below.
Direct Links to Sources: Articles / PDFs
Direct excerpts from Sources (one below each source link) 

Categories:
The 7 Habits of Highly Effective People
Assessements
Assessements - ThinkingStyles
Assessements - Listening Styles
Assessements - MBTI (Myers Briggs)
Assessements - DISC
Assessements - Work Genuis
Doden Legacy Statements of Belief
Purpose-Drive Life
Hedgehog
Critical Thinking
Motivation
Emotional Intelligence (self)
Good to Great
Mindset (Growth vs Fixed)
Leadership & Self Deception
Growth Cycle
Dualities
Johari Window
Competency Continuum
Toxic Triangle
I - We - It
Crucial Conversations
Trust Levels
engage!
engage! - discover!
engage! - listen!
engage! - affirm!/challenge!
Emotional Intelligence (others)
Team Member Continuum
collaborate!
delegate!
Communication Levels
Followership
Followership - Appeal
Ideal Team Player (Humble, Hungry, Smart)
Five Dysfunctions of a Team
Death by Meeting (Meeting Management)
The Advantage
Never Split the Difference
Method for Achieving Progress (MAP)
Z-Process
Z-Process - The Six Thinking Hats
Communicating for a Change
Kepner Tregoe Decision Making Grid
Time Management Matrix (Eisenhower)
Porter's Five Forces
Logic Model
Strategic Planning
BrandScript (StoryBrand)
Organizational Essentials
Organizational Essentials - Board GAME
Organizational Life Cycle
Leading Change
Strategic Discovery Process
Growth Platform Strategy
AE Pyramid
AE Pyramid - AE Genome
AE Pyramid - Three Returns
3Cs - Character, Chemistry, Competency
5Ts – Time, Testimony, Talent, Treasure, Temperament
5 Cs: Coach, Connect, Catalyze, Co-create, Conduct



Another prompt


Redesign the Source Sidebar in Daryle AI with Domain, Subdomain, Category Tags, Links, and Excerpts


I’m rebuilding the Source Sidebar (right-hand drawer) so that each source message is presented with the following structure and styles:


✅ Top-Level Design

tsx
Copy

Edit<div className="w-full h-full p-6 overflow-y-auto bg-white shadow-md max-w-md">
  <h2 className="text-xl font-heading text-[#082646] mb-4">Sources</h2>

  {sources.map(source => (
    <div key={source.id} className="mb-8 pb-4 border-b last:border-b-0 last:pb-0">
      {/* Top Tag Row */}
      <div className="flex justify-between items-center mb-2">
        <span className="bg-blue-100 text-blue-800 text-xs px-3 py-1 rounded-full font-medium">
          {source.domain}
        </span>
        <span className="bg-slate-200 text-slate-700 text-xs px-3 py-1 rounded-full font-semibold">
          {source.subdomain}
        </span>
      </div>

      {/* Category / Tags Row */}
      <div className="flex flex-wrap gap-2 mb-3">
        {source.tags.map(tag => (
          <span key={tag} className="bg-[#f6f0e1] text-[#a78940] text-xs px-2 py-1 rounded-full">
            {tag}
          </span>
        ))}
      </div>

      {/* Title + Link */}
      <a
        href={source.url}
        target="_blank"
        rel="noopener noreferrer"
        className="block text-sm font-semibold text-[#082646] hover:underline mb-2"
      >
        {source.title}
      </a>

      {/* Excerpt */}
      {source.excerpt && (
        <p className="text-xs text-gray-600 italic leading-snug">
          {source.excerpt}
        </p>
      )}
    </div>
  ))}
</div>


🎨 Styling Notes

ElementStyleDomain | bg-blue-100 text-blue-800
Subdomain | bg-slate-200 text-slate-700
Categories | bg-[#f6f0e1] text-[#a78940]
Link | text-[#082646] hover:underline
Excerpt | text-xs italic text-gray-600


✅ Source Object Structure (Expected per item)

ts
Copy

Edit{
  id: "growth-cycle",
  title: "Growth Cycle",
  url: "/documents/growth-cycle.pdf",
  domain: "Character",
  subdomain: "Overcoming Limiters",
  tags: ["Growth Cycle", "Mindset", "Leadership"],
  excerpt: "“Growth is not linear, it cycles through preparation, tension, and renewal.”"
}


🛠️ Files to Update


  • SourceDrawer.tsx or SourceSidebar.tsx


  • sourceMetadata.ts (ensure domain, subdomain, tags, excerpt, and url exist)


  • Add fallback excerpt or placeholder quote if not included


✅ Optional Enhancements


  • Show total source count at top: "3 sources cited"


  • Add “Collapse All” button if multiple sources are shown


  • Use framer-motion for fade-in animation per source block
Justin Sheehan
Justin Sheehan Chief Journey Officer June 20, 2025 5:06am June 20, 2025 5:06am
Troy

Bug: I'm seeing multiple of the same sources for any given chat or message.
Screenshot 2025-06-20 at 1.04.17 AM.png Download

Within a chat, is the (Source: Document, Lines 131-161) actually a thing?
Screenshot 2025-06-20 at 1.04.28 AM.png Download
Justin Sheehan
Justin Sheehan Chief Journey Officer June 20, 2025 12:38pm June 20, 2025 12:38pm
Troy I'm still seeing multiple of the same source. Is that intentional?

Screenshot 2025-06-20 at 8.38.04 AM.png Download
Troy Pastoral
Troy Pastoral AI Whisperer June 20, 2025 2:13pm June 20, 2025 2:13pm
No, I think it's the way the data is a. ingested into pinecone or b. on the source drawer logic

will investigate on pinecone
Troy Pastoral
Troy Pastoral AI Whisperer June 20, 2025 2:36pm June 20, 2025 2:36pm
confirmed: it's the way the data is ingested

grabbing the metadata of the title so we won't have duplicates

image.png Download
Troy Pastoral
Troy Pastoral AI Whisperer June 20, 2025 3:14pm June 20, 2025 3:14pm
image.png Download
The metadata might mess up what's retrieved
Justin Sheehan
Justin Sheehan Chief Journey Officer Edited June 25, 2025 2:50am June 25, 2025 2:50am
Troy here is context for these tasks below.

☑️ Only referenced sources for that particular chat

☑️ Update the tag system to include and display Domain, Subdomain, and Category (list here)

☑️ Google Drive vs Pinecone for PDF hosting 

Troy Pastoral
Troy Pastoral AI Whisperer June 30, 2025 10:11am June 30, 2025 10:11am
Strangely, without any sources on pinecone, the AI still spits out text without sources. I think it has something to do with the system prompt. Will further investigate

Justin
image.png Download
Troy Pastoral
Troy Pastoral AI Whisperer Edited June 30, 2025 10:19am June 30, 2025 10:19am
Confirmed, the system prompt is the problem. It will hallucinate text beyond it's actual knowledge database


next steps: create boundaries in thinking for all prompts




image.png Download
image.png Download
Justin Sheehan
Justin Sheehan Chief Journey Officer June 30, 2025 5:42pm June 30, 2025 5:42pm
Troy sounds good. Let me know what you find out. 
Troy Pastoral
Troy Pastoral AI Whisperer July 1, 2025 7:09am July 1, 2025 7:09am
[TESTING]

I've programmed daryle to become a monkey (for testing purposes)

Daryle will respond "OOH OOH AH AH" when the user inputs something outside the scope of their knowledge database.

Confirmed: Daryle AI is getting his pre-knowledge database from "modeSubdomains," I removed it first to see if it's reading properly from pinecone (and it is)

image.png Download
image.png Download
Troy Pastoral
Troy Pastoral AI Whisperer July 1, 2025 7:29am July 1, 2025 7:29am
Even after modifying the base prompts, it still spews out info on growth cycles, which is not referenced anywhere

Will continue to investigate

image.png Download
Troy Pastoral
Troy Pastoral AI Whisperer July 1, 2025 9:10am July 1, 2025 9:10am
UPDATE:

Okay, so the issue is the starting prompt:

Defining the boundaries help. But it's push and pull seeing which prompt balances the personality with the boundaries

image.png Download
Troy Pastoral
Troy Pastoral AI Whisperer July 1, 2025 10:33am July 1, 2025 10:33am
re ☑️ Google Drive vs Pinecone for PDF hosting 

We're actually storing all our data on pinecone, and just using google drive as the onboarding station

Flow should look like this:

GDrive -> n8n -> Pinecone -> Lovable
Troy Pastoral
Troy Pastoral AI Whisperer July 1, 2025 10:47am July 1, 2025 10:47am
[FEATURE: Domains & Subdoins]

- Create edge functions that create domain / subdomain tags based on context
Troy Pastoral
Troy Pastoral AI Whisperer July 8, 2025 8:22am July 8, 2025 8:22am
[FEATURE]

I've combined two edge functions into one to reduce latency.

There are two ways to go about the domain, sub domain feature:
1. We manually label them (like this: https://docs.google.com/spreadsheets/d/1ksaNdTJ8m8bZgGvNkJbNLoUF14JKKktmWNdUkW1pPrc/edit?gid=0#gid=0) and tell the system which ones should be labelled which.

Cons: This won't scale if we have a lot of files / sources that we need to work with

2. We use the RAG edge function - when the AI provides an output, it will also generate a tag for each response
Cons: I don't know how accurate it will be everytime (if I talk about character, the tag should be character everytime and not chemistry).

Will continue the test once I upload more documents. But this should fix the problem.
image.png Download
Troy Pastoral
Troy Pastoral AI Whisperer Edited July 9, 2025 2:27am July 9, 2025 2:27am
[FEATURE]

Domain, subdomain and categories are now working. Will continue to test

Justin
image.png Download
Justin Sheehan
Justin Sheehan Chief Journey Officer July 9, 2025 2:33am July 9, 2025 2:33am
LET'S GOOOOOOOOOOOOOOOOOOO !!
Troy Pastoral
Troy Pastoral AI Whisperer July 9, 2025 2:34am July 9, 2025 2:34am
Added some nice color coding to prettify it

image.png Download
Troy Pastoral
Troy Pastoral AI Whisperer July 9, 2025 2:40am July 9, 2025 2:40am
Re email:

Bot refused to answer questions because I only had 2 source documents uploaded. I've reuploaded all of them already.

The bot should answer as close to the user's prompts. The parameters of word search can be adjusted later on to improve the response accuracy (for maximum user satisfaction)
image.png Download
Troy Pastoral
Troy Pastoral AI Whisperer July 9, 2025 2:41am July 9, 2025 2:41am
Next steps:

Create n8n workflow that seamlessly ingests source documents / files.
Justin Sheehan
Justin Sheehan Chief Journey Officer July 9, 2025 2:42am July 9, 2025 2:42am
Is there a way to have it just answer if it doesn't have the sources? Troy  
Troy Pastoral
Troy Pastoral AI Whisperer July 9, 2025 2:43am July 9, 2025 2:43am
Yes, that will depend on our system prompt.

This was proven already when there was nothing in the knowledge base and the bot was still spewing answers.