Почему моя база данных векторов получает нерелевантные результаты?Python

Программы на Python
Anonymous
Почему моя база данных векторов получает нерелевантные результаты?

Сообщение Anonymous »

Я пытаюсь создать векторную базу данных на Python, используя LangChain для расширения поиска с помощью большой языковой модели. В настоящее время я использую NCBI Statpearls (сборник медицинских данных) и в целях тестирования инициализировал векторную базу данных только одной статьей об окклюзии артерий. Вместо того, чтобы разбивать по токенам, я разбил по абзацам, а также добавил информацию о заголовке и названии раздела в каждый фрагмент для контекста.
Однако база данных часто извлекает результаты, не имеющие отношения к моим запросы. Например, когда я ищу только термин «конечная стадия заболевания почек» (о котором в тексте упоминается 1 раз), база данных возвращает первый результат:

Код: Выделить всё

ARTICLE TITLE: Chronic Total Occlusion of the Coronary Artery
SECTION NAME: History and Physical
The history should also include risk factors for cardiovascular disease (diabetes, tobacco abuse, hypertension, hyperlipidemia) and non-cardiac causes of the patient's symptoms, including pulmonary embolism, aortic dissection, pneumothorax, esophageal rupture or perforating peptic ulcer. Physical examination in these patients should include complete auscultation of the heart and lung sounds together with assessment for heart failure signs including jugular venous distention, Kussmaul sign, hepatojugular reflex, ascites, and peripheral edema.
Обратите внимание, что здесь нет упоминания о заболевании почек. И второе, где тоже совершенно об этом не упоминается:

Код: Выделить всё

ARTICLE TITLE: Chronic Total Occlusion of the Coronary Artery
SECTION NAME: Prognosis
In addition to causing symptoms, CTOs have correlations with a worse overall prognosis, with higher rates of death and non-fatal adverse cardiovascular events in several populations. Patients with CTOs tend to be older and have more comorbidities and more significant impairment of left ventricular function. Furthermore, patients with non-revascularized CTOs have higher mortality and a higher risk of major adverse cardiovascular events in comparison to patients with multivessel coronary artery disease who are completely revascularized.
Только в третьем результате возвращается отрывок, в котором упоминается заболевание почек:

Код: Выделить всё

ARTICLE TITLE: Chronic Total Occlusion of the Coronary Artery
SECTION NAME: Etiology
Risk factors for CTO lesion in patients are as below

Known coronary artery disease or history of myocardial infarction

Excessive tobacco use

High LDL cholesterol, low HDL cholesterol

Diabetes

Sedentary lifestyle

Hypertension

Family history of premature disease

End-stage kidney disease 

Подробнее здесь: [url]https://stackoverflow.com/questions/77058068/why-is-my-vector-database-retrieving-irrelevant-results[/url]

Вернуться в «Python»