Skip to content

Commit

Permalink
tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
mbilokonsky committed Mar 27, 2024
1 parent 871b8b0 commit 35fc420
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/course-builder-web/src/utils/vector-utils/rag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ const vectorStore = new PineconeVectorStore({
indexName: 'rag',
})

const nodeParser = new MarkdownNodeParser()
const nodeParser = new MarkdownNodeParser({
includeMetadata: true,
includePrevNextRel: true,
})

const storageContext = await storageContextFromDefaults({
vectorStore,
Expand All @@ -48,6 +51,8 @@ const serviceContext = serviceContextFromDefaults({
model: 'gpt-4-0125-preview',
}),
embedModel: new OpenAIEmbedding(),
chunkSize: 10000,
chunkOverlap: 100,
})

export async function ingest(source_filename: string) {
Expand Down

0 comments on commit 35fc420

Please sign in to comment.