cookbook/Semi_Structured_RAG.ipynb  ERROR：IndexError: list index out of range
Labels: name: area: doc loader, name: auto:bug

### System Info

cenos7
python3.9
langchai 0.0.333

Reading error PDF file here：
[llm.pdf](https://github.com/langchain-ai/langchain/files/13318006/llm.pdf)


### Who can help?

_No response_

### Information

- [ ] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

from lxml import html
from pydantic import BaseModel
from typing import Any, Optional
from unstructured.partition.pdf import partition_pdf
from langchain.chat_models import ChatOpenAI
from langchain.prompts import ChatPromptTemplate
from langchain.schema.output_parser import StrOutputParser
import uuid,os
from langchain.vectorstores import Chroma
from langchain.storage import InMemoryStore
from langchain.schema.document import Document
from langchain.embeddings import OpenAIEmbeddings
from langchain.retrievers.multi_vector import MultiVectorRetriever

os.environ["OPENAI_API_KEY"] = ''

path=rf"/mnt/PD/PDF/"
# Get elements
raw_pdf_elements = partition_pdf(
    filename=path + "llm.pdf",
    # Unstructured first finds embedded image blocks
    extract_images_in_pdf=False,
    # Use layout model (YOLOX) to get bounding boxes (for tables) and find titles
    # Titles are any sub-section of the document
    infer_table_structure=True,
    # Post processing to aggregate text once we have the title
    chunking_strategy="by_title",
    # Chunking params to aggregate text blocks
    # Attempt to create a new chunk 3800 chars
    # Attempt to keep chunks > 2000 chars
    max_characters=4000,
    new_after_n_chars=3800,
    combine_text_under_n_chars=2000,
    image_output_dir_path=path,
)


### Expected behavior

https://github.com/langchain-ai/langchain/blob/master/cookbook/Semi_Structured_RAG.ipynb?ref=blog.langchain.dev

When testing langchain's Semi_Structured_RAG.ipynb, I tested the PDF files used. Some PDFs were read normally, but some PDFs reported errors. The error log is as follows:

  File "/mnt/PD/test.py", line 20, in <module>
    raw_pdf_elements = partition_pdf(
  File "/usr/local/lib/python3.9/site-packages/unstructured/documents/elements.py", line 372, in wrapper
    elements = func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/unstructured/file_utils/filetype.py", line 591, in wrapper
    elements = func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/unstructured/file_utils/filetype.py", line 546, in wrapper
    elements = func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/unstructured/chunking/title.py", line 297, in wrapper
    elements = func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/unstructured/partition/pdf.py", line 182, in partition_pdf
    return partition_pdf_or_image(
  File "/usr/local/lib/python3.9/site-packages/unstructured/partition/pdf.py", line 312, in partition_pdf_or_image
    _layout_elements = _partition_pdf_or_image_local(
  File "/usr/local/lib/python3.9/site-packages/unstructured/utils.py", line 179, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/unstructured/partition/pdf.py", line 413, in _partition_pdf_or_image_local
    final_layout = process_file_with_ocr(
  File "/usr/local/lib/python3.9/site-packages/unstructured/partition/ocr.py", line 170, in process_file_with_ocr
    raise e
  File "/usr/local/lib/python3.9/site-packages/unstructured/partition/ocr.py", line 159, in process_file_with_ocr
    merged_page_layout = supplement_page_layout_with_ocr(
  File "/usr/local/lib/python3.9/site-packages/unstructured/partition/ocr.py", line 238, in supplement_page_layout_with_ocr
    page_layout.elements[:] = supplement_element_with_table_extraction(
  File "/usr/local/lib/python3.9/site-packages/unstructured/partition/ocr.py", line 274, in supplement_element_with_table_extraction
    element.text_as_html = table_agent.predict(cropped_image, ocr_tokens=table_tokens)
  File "/usr/local/lib/python3.9/site-packages/unstructured_inference/models/tables.py", line 54, in predict
    return self.run_prediction(x, ocr_tokens=ocr_tokens)
  File "/usr/local/lib/python3.9/site-packages/unstructured_inference/models/tables.py", line 191, in run_prediction
    prediction = recognize(outputs_structure, x, tokens=ocr_tokens)[0]
IndexError: list index out of range