object Form21: TForm21
  Left = 0
  Top = 0
  Caption = 'RAG Demo - Vector Query Language (VQL) | MakerAI'
  ClientHeight = 700
  ClientWidth = 1200
  Position = ScreenCenter
  FormFactor.Width = 320
  FormFactor.Height = 480
  FormFactor.Devices = [Desktop]
  OnCreate = FormCreate
  DesignerMasterStyle = 0
  object LayoutLeft: TLayout
    Align = Left
    Size.Width = 290.000000000000000000
    Size.Height = 700.000000000000000000
    Size.PlatformDefault = False
    TabOrder = 0
    object GbKnowledge: TGroupBox
      Align = Top
      Margins.Left = 6.000000000000000000
      Margins.Top = 6.000000000000000000
      Margins.Right = 6.000000000000000000
      Margins.Bottom = 6.000000000000000000
      Position.X = 6.000000000000000000
      Position.Y = 6.000000000000000000
      Size.Width = 278.000000000000000000
      Size.Height = 248.000000000000000000
      Size.PlatformDefault = False
      Text = 'Base de Conocimientos'
      TabOrder = 0
      object BtnUploadFile: TButton
        Position.X = 8.000000000000000000
        Position.Y = 32.000000000000000000
        Size.Width = 262.000000000000000000
        Size.Height = 32.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 0
        Text = 'Importar Texto...'
        TextSettings.Trimming = None
        OnClick = BtnUploadFileClick
      end
      object BtnSaveToFile: TButton
        Position.X = 8.000000000000000000
        Position.Y = 70.000000000000000000
        Size.Width = 262.000000000000000000
        Size.Height = 32.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 1
        Text = 'Guardar Base...'
        TextSettings.Trimming = None
        OnClick = BtnSaveToFileClick
      end
      object BtnLoadFromfile: TButton
        Position.X = 8.000000000000000000
        Position.Y = 108.000000000000000000
        Size.Width = 262.000000000000000000
        Size.Height = 32.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 2
        Text = 'Cargar Base...'
        TextSettings.Trimming = None
        OnClick = BtnLoadFromfileClick
      end
      object BtnCreateTable: TButton
        Position.X = 8.000000000000000000
        Position.Y = 146.000000000000000000
        Size.Width = 262.000000000000000000
        Size.Height = 30.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 3
        Text = 'Crear Tabla PostgreSQL'
        TextSettings.Trimming = None
        OnClick = BtnCreateTableClick
      end
      object BtnCancelar: TButton
        Enabled = False
        Position.X = 8.000000000000000000
        Position.Y = 182.000000000000000000
        Size.Width = 262.000000000000000000
        Size.Height = 28.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 4
        Text = 'Cancelar Importacion'
        TextSettings.Trimming = None
        OnClick = BtnCancelarClick
      end
      object ProgressBar1: TProgressBar
        Orientation = Horizontal
        Position.X = 8.000000000000000000
        Position.Y = 218.000000000000000000
        Size.Width = 262.000000000000000000
        Size.Height = 16.000000000000000000
        Size.PlatformDefault = False
      end
    end
    object GbSearchMode: TGroupBox
      Align = Top
      Margins.Left = 6.000000000000000000
      Margins.Right = 6.000000000000000000
      Margins.Bottom = 6.000000000000000000
      Position.X = 6.000000000000000000
      Position.Y = 260.000000000000000000
      Size.Width = 278.000000000000000000
      Size.Height = 152.000000000000000000
      Size.PlatformDefault = False
      Text = 'Modo de Busqueda'
      TabOrder = 1
      object ChSemanticSearch: TCheckBox
        IsChecked = True
        Position.X = 8.000000000000000000
        Position.Y = 28.000000000000000000
        Size.Width = 258.000000000000000000
        Size.Height = 22.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 0
        Text = 'Busqueda Semantica (Embeddings)'
        OnChange = ChSemanticSearchChange
      end
      object ChLexicalSearch: TCheckBox
        Position.X = 8.000000000000000000
        Position.Y = 56.000000000000000000
        Size.Width = 258.000000000000000000
        Size.Height = 22.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 1
        Text = 'Busqueda Lexica (BM25)'
        OnChange = ChLexicalSearchChange
      end
      object ChEnableRRF: TCheckBox
        Position.X = 8.000000000000000000
        Position.Y = 84.000000000000000000
        Size.Width = 258.000000000000000000
        Size.Height = 22.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 2
        Text = 'Fusion RRF'
        OnChange = ChEnableRRFChange
      end
      object ChReorderABC: TCheckBox
        Position.X = 8.000000000000000000
        Position.Y = 112.000000000000000000
        Size.Width = 258.000000000000000000
        Size.Height = 22.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 3
        Text = 'Reordenar Contexto (Lost-in-Middle)'
      end
    end
    object GbParams: TGroupBox
      Align = Top
      Margins.Left = 6.000000000000000000
      Margins.Right = 6.000000000000000000
      Margins.Bottom = 6.000000000000000000
      Position.X = 6.000000000000000000
      Position.Y = 418.000000000000000000
      Size.Width = 278.000000000000000000
      Size.Height = 128.000000000000000000
      Size.PlatformDefault = False
      Text = 'Parametros'
      TabOrder = 2
      object Label10: TLabel
        Position.X = 8.000000000000000000
        Position.Y = 32.000000000000000000
        Text = 'Precision minima:'
        TabOrder = 0
      end
      object EditPrecision: TEdit
        Touch.InteractiveGestures = [LongTap, DoubleTap]
        TabOrder = 1
        Text = '0.7'
        Position.X = 148.000000000000000000
        Position.Y = 28.000000000000000000
        Size.Width = 120.000000000000000000
        Size.Height = 26.000000000000000000
        Size.PlatformDefault = False
      end
      object Label2: TLabel
        Position.X = 8.000000000000000000
        Position.Y = 68.000000000000000000
        Text = 'Limite de resultados:'
        TabOrder = 2
      end
      object EditLimit: TEdit
        Touch.InteractiveGestures = [LongTap, DoubleTap]
        TabOrder = 3
        Text = '10'
        Position.X = 148.000000000000000000
        Position.Y = 64.000000000000000000
        Size.Width = 120.000000000000000000
        Size.Height = 26.000000000000000000
        Size.PlatformDefault = False
      end
      object ChShowProperties: TCheckBox
        IsChecked = True
        Position.X = 8.000000000000000000
        Position.Y = 96.000000000000000000
        Size.Width = 258.000000000000000000
        Size.Height = 22.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 4
        Text = 'Incluir metadatos en resultado'
      end
    end
    object BtnMostrarTodos: TButton
      Align = Top
      Margins.Left = 6.000000000000000000
      Margins.Right = 6.000000000000000000
      Margins.Bottom = 4.000000000000000000
      Position.X = 6.000000000000000000
      Position.Y = 552.000000000000000000
      Size.Width = 278.000000000000000000
      Size.Height = 32.000000000000000000
      Size.PlatformDefault = False
      TabOrder = 3
      Text = 'Mostrar Todos los Nodos'
      TextSettings.Trimming = None
      OnClick = BtnMostrarTodosClick
    end
    object LblStatus: TLabel
      Align = Bottom
      Margins.Left = 8.000000000000000000
      Margins.Bottom = 6.000000000000000000
      Position.X = 8.000000000000000000
      Position.Y = 674.000000000000000000
      Size.Width = 282.000000000000000000
      Size.Height = 20.000000000000000000
      Size.PlatformDefault = False
      Text = 'Listo'
      TabOrder = 4
    end
  end
  object SplitterV: TSplitter
    Align = Left
    Cursor = crHSplit
    MinSize = 200.000000000000000000
    Position.X = 290.000000000000000000
    Size.Width = 5.000000000000000000
    Size.Height = 700.000000000000000000
    Size.PlatformDefault = False
  end
  object LayoutRight: TLayout
    Align = Client
    Padding.Left = 4.000000000000000000
    Padding.Top = 4.000000000000000000
    Padding.Right = 4.000000000000000000
    Padding.Bottom = 4.000000000000000000
    Size.Width = 905.000000000000000000
    Size.Height = 700.000000000000000000
    Size.PlatformDefault = False
    TabOrder = 2
    object LayoutResults: TLayout
      Align = Client
      Size.Width = 897.000000000000000000
      Size.Height = 347.000000000000000000
      Size.PlatformDefault = False
      object Label3: TLabel
        Align = Top
        Margins.Left = 2.000000000000000000
        Margins.Top = 2.000000000000000000
        Margins.Bottom = 4.000000000000000000
        Position.X = 2.000000000000000000
        Position.Y = 2.000000000000000000
        Size.Width = 895.000000000000000000
        Size.Height = 20.000000000000000000
        Size.PlatformDefault = False
        Text = 'Resultados'
        TabOrder = 0
      end
      object MemoResponse: TMemo
        Touch.InteractiveGestures = [Pan, LongTap, DoubleTap]
        DataDetectorTypes = []
        ReadOnly = True
        TextSettings.WordWrap = True
        Align = Client
        Margins.Left = 2.000000000000000000
        Margins.Right = 2.000000000000000000
        Margins.Bottom = 2.000000000000000000
        Size.Width = 893.000000000000000000
        Size.Height = 319.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 1
        Viewport.Width = 889.000000000000000000
        Viewport.Height = 315.000000000000000000
      end
    end
    object LayoutQuery: TLayout
      Align = Bottom
      Position.X = 4.000000000000000000
      Position.Y = 356.000000000000000000
      Size.Width = 897.000000000000000000
      Size.Height = 340.000000000000000000
      Size.PlatformDefault = False
      object Label1: TLabel
        Align = Top
        Margins.Left = 2.000000000000000000
        Margins.Top = 2.000000000000000000
        Margins.Bottom = 4.000000000000000000
        Position.X = 2.000000000000000000
        Position.Y = 2.000000000000000000
        Size.Width = 895.000000000000000000
        Size.Height = 20.000000000000000000
        Size.PlatformDefault = False
        Text = 'Consulta / VQL Query'
        TabOrder = 0
      end
      object LayoutButtons: TLayout
        Align = Bottom
        Position.Y = 252.000000000000000000
        Size.Width = 897.000000000000000000
        Size.Height = 88.000000000000000000
        Size.PlatformDefault = False
        object BtnConsultar: TButton
          Position.X = 4.000000000000000000
          Position.Y = 4.000000000000000000
          Size.Width = 400.000000000000000000
          Size.Height = 38.000000000000000000
          Size.PlatformDefault = False
          TabOrder = 0
          Text = 'Buscar (Modo Simple)'
          TextSettings.Trimming = None
          OnClick = BtnConsultarClick
        end
        object BtnBuscarVGQL: TButton
          Position.X = 410.000000000000000000
          Position.Y = 4.000000000000000000
          Size.Width = 400.000000000000000000
          Size.Height = 38.000000000000000000
          Size.PlatformDefault = False
          TabOrder = 1
          Text = 'Ejecutar Consulta VQL'
          TextSettings.Trimming = None
          OnClick = BtnBuscarVGQLClick
        end
        object BtnConsultaToText: TButton
          Position.X = 4.000000000000000000
          Position.Y = 48.000000000000000000
          Size.Width = 400.000000000000000000
          Size.Height = 38.000000000000000000
          Size.PlatformDefault = False
          TabOrder = 2
          Text = 'Ver Config. Simple'
          TextSettings.Trimming = None
          OnClick = BtnConsultaToTextClick
        end
        object BtnVGqlToText: TButton
          Position.X = 410.000000000000000000
          Position.Y = 48.000000000000000000
          Size.Width = 400.000000000000000000
          Size.Height = 38.000000000000000000
          Size.PlatformDefault = False
          TabOrder = 3
          Text = 'Ver Config. VQL'
          TextSettings.Trimming = None
          OnClick = BtnVGqlToTextClick
        end
      end
      object MemoPrompt: TMemo
        Touch.InteractiveGestures = [Pan, LongTap, DoubleTap]
        DataDetectorTypes = []
        TextSettings.Font.Family = 'Courier New'
        TextSettings.Font.Size = 11.000000000000000000
        TextSettings.WordWrap = True
        Align = Client
        Margins.Left = 2.000000000000000000
        Margins.Right = 2.000000000000000000
        Margins.Bottom = 2.000000000000000000
        Size.Width = 893.000000000000000000
        Size.Height = 224.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 4
        Viewport.Width = 889.000000000000000000
        Viewport.Height = 220.000000000000000000
      end
    end
    object Splitter1: TSplitter
      Align = Bottom
      Cursor = crVSplit
      MinSize = 20.000000000000000000
      Position.X = 4.000000000000000000
      Position.Y = 351.000000000000000000
      Size.Width = 897.000000000000000000
      Size.Height = 5.000000000000000000
      Size.PlatformDefault = False
    end
  end
  object OpenDialog1: TOpenDialog
    Left = 72
    Top = 536
  end
  object SaveDialog1: TSaveDialog
    Left = 184
    Top = 600
  end
  object AiOllamaEmbeddings1: TAiOllamaEmbeddings
    Model = 'snowflake-arctic-embed'
    Dimensions = 1024
    ApiKey = '@OLLAMA_API_KEY'
    Url = 'http://localhost:11434/'
    Left = 64
    Top = 616
  end
  object RAG: TAiRAGVector
    OnImportProgress = RAGImportProgress
    Embeddings = AiOllamaEmbeddings1
    LexicalLanguage = alEnglish
    OwnsObjects = True
    SearchOptions.UseBM25 = False
    SearchOptions.BM25Weight = 0.700000000000000000
    SearchOptions.EmbeddingWeight = 0.300000000000000000
    Left = 72
    Top = 456
  end
  object DbConn: TFDConnection
    Params.Strings = (
      'Database=lunaidb'
      'User_Name=postgres'
      'Password=masterkey'
      'Server=localhost'
      'DriverID=PG')
    Left = 520
    Top = 600
  end
  object PgDriver: TAiRAGVectorPostgresDriver
    Connection = DbConn
    TableName = 'vector_store'
    CurrentEntidad = 'DEFAULT'
    Left = 344
    Top = 600
  end
end
